Project

General

Profile

Backport #41071

Updated by Ramana Raja about 1 year ago

https://github.com/ceph/ceph/pull/29180/ <pre>
$ ./bin/ceph fs subvolumegroup create a csi
Error EINVAL: Traceback (most recent call last):
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/fs/subvolume.py", line 53, in _mkdir_p
self.fs.stat(subpath)
File "cephfs.pyx", line 1071, in cephfs.LibCephFS.stat
cephfs.ObjectNotFound: [Errno 2] error in stat: b'volumes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rraja/git/ceph/src/pybind/mgr/mgr_module.py", line 889, in _handle_command
return self.handle_command(inbuf, cmd)
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/module.py", line 188, in handle_command
return handler(inbuf, cmd)
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/module.py", line 211, in _cmd_fs_subvolumegroup_create
pool_layout=cmd.get('pool_layout', None), mode=cmd.get('mode', '755'))
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/fs/volume.py", line 361, in conn_wrapper
result = func(self, fs_h, **kwargs)
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/fs/volume.py", line 501, in create_subvolume_group
sv.create_group(spec, pool=pool, mode=self.octal_str_to_decimal_int(mode))
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/fs/subvolume.py", line 206, in create_group
self._mkdir_p(path, mode)
File "/home/rraja/git/ceph/src/pybind/mgr/volumes/fs/subvolume.py", line 55, in _mkdir_p
self.fs.mkdir(subpath, mode)
File "cephfs.pyx", line 765, in cephfs.LibCephFS.mkdir
cephfs.Error: (13, "error in mkdir 'b'volumes'': error code 13")

</pre>

Solution: Inside the ceph-mgr's volumes module, have the filesystem client have uid/gid as 0/0 by using `conf_set` interface, before mounting the ceph filesystem and creating directories.

Back