Skip to content

Commit 70172f7

Browse files
Merge pull request ceph#61004 from rishabh-d-dave/mgr-vol-EINVAL
mgr/vol: use error number instead of error message Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]>
2 parents b179889 + b0f469e commit 70172f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pybind/mgr/volumes/fs/stats_util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
cloning) and pass, print, log and convert them to human readable format
66
conveniently.
77
'''
8+
import errno
89
from os.path import join as os_path_join
910
from typing import Optional
1011
from logging import getLogger
@@ -190,7 +191,7 @@ def _get_info_for_all_clones(self):
190191
f'Printing the exception: {e}')
191192
continue
192193
except VolumeException as e:
193-
if e.error_str != 'error fetching subvolume metadata':
194+
if e.errno != -errno.EINVAL:
194195
raise
195196
log.info('Exception VolumeException was raised. Apparently '
196197
'an entry from the metadata file of clone source '

0 commit comments

Comments
 (0)