]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/vol : shortening the name of function 60396/head
authorneeraj pratap singh <neerajpratapsingh@li-ff7f0d4c-3462-11b2-a85c-d4004c0fa1a0.ibm.com>
Wed, 26 Jun 2024 16:59:16 +0000 (22:29 +0530)
committerneeraj pratap singh <neerajpratapsingh@li-ff7f0d4c-3462-11b2-a85c-d4004c0fa1a0.ibm.com>
Fri, 18 Oct 2024 13:04:19 +0000 (18:34 +0530)
Fixes: https://tracker.ceph.com/issues/66815
Introduced by:https://github.com/ceph/ceph/pull/55838#discussion_r1573655512
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
(cherry picked from commit 6ae002460b8474abe7ebc3592605b88f53253387)

src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py

index 610a61e6a4c1fbf03bfa8048664c53cd5d5da357..146d6d3f453d660e83b2b6fea21a8d27f42545f4 100644 (file)
@@ -172,7 +172,7 @@ class MetadataManager(object):
                 metadata_dict[option] = self.config.get(section,option)
         return metadata_dict
 
-    def list_all_keys_with_specified_values_from_section(self, section, value):
+    def filter_keys(self, section, value):
         keys = []
         if self.config.has_section(section):
             options = self.config.options(section)
index fa71660f502a22b7bb512618d49315f1d3519121..ec817d7e3d2f636037afce34e0f30a2e2eabd207 100644 (file)
@@ -753,7 +753,7 @@ class SubvolumeV1(SubvolumeBase, SubvolumeTemplate):
 
         try:
             if self.has_pending_clones(snapname):
-                pending_track_id_list = self.metadata_mgr.list_all_keys_with_specified_values_from_section('clone snaps', snapname)
+                pending_track_id_list = self.metadata_mgr.filter_keys('clone snaps', snapname)
             else:
                 return pending_clones_info
         except MetadataMgrException as me:
@@ -775,9 +775,9 @@ class SubvolumeV1(SubvolumeBase, SubvolumeTemplate):
                     raise VolumeException(-e.args[0], e.args[1])
                 else:
                     try:
-                        # If clone is completed between 'list_all_keys_with_specified_values_from_section'
-                        # and readlink(track_id_path) call then readlink will fail with error ENOENT (2)
-                        # Hence we double check whether track_id is exist in .meta file or not.
+                        # If clone is completed between 'filter_keys' and readlink(track_id_path) call
+                        # then readlink will fail with error ENOENT (2). Hence we double check whether
+                        # track_id exists in .meta file or not.
                         # Edge case scenario.
                         # If track_id for clone exist but path /volumes/_index/clone/{track_id} not found
                         # then clone is orphan.