]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/vol: use error number instead of error message 61004/head
authorRishabh Dave <ridave@redhat.com>
Mon, 9 Dec 2024 17:00:15 +0000 (22:30 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 9 Dec 2024 17:00:15 +0000 (22:30 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/pybind/mgr/volumes/fs/stats_util.py

index 3334dc5a3d7656a0c90bd299878fb30546e50cda..ccb64efce902ad6e68bce1c0cda0a5fc1b8a0901 100644 (file)
@@ -5,6 +5,7 @@ and destination directory for the copy operation that is performed for snapshot
 cloning) and pass, print, log and convert them to human readable format
 conveniently.
 '''
+import errno
 from os.path import join as os_path_join
 from typing import Optional
 from logging import getLogger
@@ -190,7 +191,7 @@ class CloneProgressReporter:
                                  f'Printing the exception: {e}')
                         continue
                     except VolumeException as e:
-                        if e.error_str != 'error fetching subvolume metadata':
+                        if e.errno != -errno.EINVAL:
                             raise
                         log.info('Exception VolumeException was raised. Apparently '
                                  'an entry from the metadata file of clone source '