Project

General

Profile

Bug #41337

mgr/volumes: handle incorrect pool_layout setting during `fs subvolume/subvolume group create`

Added by Ramana Raja about 1 month ago. Updated 28 days ago.

Status:
Pending Backport
Priority:
High
Assignee:
Category:
Administration/Usability
Target version:
Start date:
Due date:
% Done:

0%

Source:
Q/A
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:

Description

Instead of a traceback, raise a clear error and log error message when FS subvolume and subvolume group is created with an invalid pool layout,

ceph fs subvolume create ocsci-cephfs csi-vol-d9da6697-bf6f-11e9-ac31-0a580a810209 1073741824 --group_name csi --mode 777 -m 172.30.253.231:6789,172.30.37.131:6789,172.30.75.64:6789 -c /etc/ceph/ceph.conf -n client.admin --keyfile=***stripped*** --pool_layout ocsci-cephfs]: exit status 22: Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 909, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 182, in handle_command
    return handler(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 231, in _cmd_fs_subvolume_create
    return self.vc.create_subvolume(vol_name, sub_name, group_name, size, mode=mode, pool=pool_layout)
  File "/usr/share/ceph/mgr/volumes/fs/volume.py", line 194, in create_subvolume
    sv.create_subvolume(spec, size, pool=pool, mode=self.octal_str_to_decimal_int(mode))
  File "/usr/share/ceph/mgr/volumes/fs/subvolume.py", line 86, in create_subvolume
    self.fs.setxattr(subvolpath, 'ceph.dir.layout.pool', pool.encode('utf-8'), 0)
  File "cephfs.pyx", line 1087, in cephfs.LibCephFS.setxattr (/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/14.2.2/rpm/el7/BUILD/ceph-14.2.2/build/src/pybind/cephfs/pyrex/cephfs.c:11862)
InvalidValue: [Errno 22] error in setxattr

Related issues

Copied to fs - Backport #41444: nautilus: mgr/volumes: handle incorrect pool_layout setting during `fs subvolume/subvolume group create` In Progress

History

#1 Updated by Patrick Donnelly about 1 month ago

  • Description updated (diff)
  • Priority changed from Normal to High
  • Start date deleted (08/19/2019)

#2 Updated by Ramana Raja about 1 month ago

  • Status changed from In Progress to Need Review
  • Pull request ID set to 29760

#3 Updated by Patrick Donnelly 28 days ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler 26 days ago

  • Copied to Backport #41444: nautilus: mgr/volumes: handle incorrect pool_layout setting during `fs subvolume/subvolume group create` added

Also available in: Atom PDF