canonical / canonical/microceph

Troubles creating subvolume group in a cephfs mirroring environment

Open
#610 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
396
Forks
74
Avg merge
2d 20h
Merged PRs (30d)
7

Description

I have tried to reproduce this in a fresh and basic environment but it worked fine, so it probably has to do with cephfs-mirroring being enabled on the volume. I will add more information if this occurs again.

## Reproduce
1. Install 2 node (primary-secondary) clusters.
2. Create volume "vol" on both sites
3. Enable `cephfs-mirror` daemon primary site.
4. Enable "mirroring" mgr module and enable snapshot mirroring on "vol"
5. Mount "vol" on primary and create multiple directories.
6. Enable snapshot mirroring for the said directories.
7. Create a subvolume group for volume "vol"
--> FAILURE
```
# ceph fs subvolumegroup create vol openstack
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1908, in _handle_command
return self.handle_command(inbuf, cmd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/ceph/mgr/volumes/module.py", line 653, in handle_command
return handler(inbuf, cmd)
^^^^^^^^^^^^^^^^^^^
File "/usr/share/ceph/mgr/volumes/module.py", line 38, in wrap
return f(self, inbuf, cmd)
^^^^^^^^^^^^^^^^^^^
File "/usr/share/ceph/mgr/volumes/module.py", line 687, in _cmd_fs_subvolumegroup_create
return self.vc.create_subvolume_group(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/ceph/mgr/volumes/fs/volume.py", line 1018, in create_subvolume_group
set_group_attrs(fs_handle, group.path, attrs)
File "/usr/share/ceph/mgr/volumes/fs/operations/group.py", line 190, in set_group_attrs
pool = get_ancestor_xattr(fs, path, "ceph.dir.layout.pool")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/ceph/mgr/volumes/fs/fs_util.py", line 199, in get_ancestor_xattr
return fs.getxattr(path, attr).decode('utf-8')
^^^^^^^^^^^^^^^^^^^^^^^
File "cephfs.pyx", line 1709, in cephfs.LibCephFS.getxattr
File "cephfs.pyx", line 232, in cephfs.make_ex
TypeError: Charset.__init__() takes from 1 to 2 positional arguments but 3 were given
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the seven-step CephFS mirroring setup and run the failing subvolume-group command. Start with mgr/volumes/fs/operations/group.py at set_group_attrs and mgr/volumes/fs/fs_util.py at get_ancestor_xattr, then inspect the cephfs.pyx getxattr traceback; done means the group can be created in this setup without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.