From: Rishabh Dave Date: Thu, 3 Apr 2025 18:27:15 +0000 (+0530) Subject: mgr/vol: include group name in subvolume's pool namespace name X-Git-Tag: testing/wip-jcollin-testing-20250820.084115-squid~3^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d25695a5a6b5a360d308de207d402bdf109fade0;p=ceph-ci.git mgr/vol: include group name in subvolume's pool namespace name Include subvolume group name along with subvolume name in the pool namepsace string for the subvolume. IOW, include it in the string that serves as the value of the extended attribute "ceph.dir.layout.pool_namespace", which is set for a subvolume during its creation. Right now, due to not including it, two different subvolumes with same name but located in different subvolume groups undesirably end up in the same namespace. Fixes: https://tracker.ceph.com/issues/70668 Signed-off-by: Rishabh Dave (cherry picked from commit 45f8abab8f467043823241233664789f127a7c6b) --- diff --git a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py index 3aaf78e4648..07323367206 100644 --- a/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py +++ b/src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py @@ -93,7 +93,7 @@ class SubvolumeBase(object): @property def namespace(self): - return "{0}{1}".format(self.vol_spec.fs_namespace, self.subvolname) + return f'{self.vol_spec.fs_namespace}_{self.group.groupname}_{self.subvolname}' @property def group_name(self):