]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/vol: include group name in subvolume's pool namespace name
authorRishabh Dave <ridave@redhat.com>
Thu, 3 Apr 2025 18:27:15 +0000 (23:57 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 26 Jun 2025 08:31:53 +0000 (14:01 +0530)
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 <ridave@redhat.com>
(cherry picked from commit 45f8abab8f467043823241233664789f127a7c6b)

src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py

index 3aaf78e4648236715d704420acc1c732a071e97c..073233672064f9d4bbd3dcdd9be34402b71f8d41 100644 (file)
@@ -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):