]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/vol: rename _remove_on_failure() of subvol v2
authorRishabh Dave <ridave@redhat.com>
Sat, 29 Mar 2025 11:30:50 +0000 (17:00 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 21 Nov 2025 05:46:43 +0000 (11:16 +0530)
Rename it to "_remove_data_dir_on_failure", since it is a more
descriptive name.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py

index d5680327f3d04c838a9c6c108431cc6eb791355f..ae1c7fe93b4deed3de6de8efee0d2efe9151c623 100644 (file)
@@ -138,7 +138,7 @@ class SubvolumeV2(SubvolumeV1):
 
         return os.path.join(snap_base_path, uuid_str)
 
-    def _remove_on_failure(self, subvol_path, retained):
+    def _remove_data_dir_on_failure(self, retained):
         if retained:
             log.info("cleaning up subvolume incarnation with path: {0}".format(subvol_path))
             try:
@@ -195,7 +195,7 @@ class SubvolumeV2(SubvolumeV1):
             self.auth_mdata_mgr.create_subvolume_metadata_file(self.group.groupname, self.subvolname)
         except (VolumeException, MetadataMgrException, cephfs.Error) as e:
             try:
-                self._remove_on_failure(subvol_path, retained)
+                self._remove_data_dir_on_failure(retained)
             except VolumeException as ve:
                 log.info("failed to cleanup subvolume '{0}' ({1})".format(self.subvolname, ve))
 
@@ -249,7 +249,7 @@ class SubvolumeV2(SubvolumeV1):
             self.metadata_mgr.flush()
         except (VolumeException, MetadataMgrException, cephfs.Error) as e:
             try:
-                self._remove_on_failure(subvol_path, retained)
+                self._remove_data_dir_on_failure(retained)
             except VolumeException as ve:
                 log.info("failed to cleanup subvolume '{0}' ({1})".format(self.subvolname, ve))