]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Wed, 14 May 2025 17:58:57 +0000 (23:28 +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>
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py

index 47cef092aad79ae8074f6a964a30af58aa26faf1..e73244985bb63257c6808d50e687b5dcb2d3daa0 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):