Actions
Bug #22306
closedPython RBD metadata_get does not work.
% Done:
0%
Source:
Tags:
rbd python metadata image-meta
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rbd
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Here is the part of traceback:
metaval = rbd_image.metadata_get('backup-skip') File "rbd.pyx", line 2687, in rbd.Image.metadata_get (/build/ceph-12.2.1/obj-x86_64-linux-gnu/src/pybind/rbd3/pyrex/rbd.c:30949) AttributeError: 'rbd.Image' object has no attribute 'key'
Updated by Mykola Golub over 6 years ago
- Status changed from New to In Progress
- Assignee set to Mykola Golub
Updated by Mykola Golub over 6 years ago
- Subject changed from Python RBD metadata_get dows not work. to Python RBD metadata_get does not work.
Updated by Mykola Golub over 6 years ago
Mark, I assume 'backup-skip' metadata key did not exist before metadata_get call? Otherwise I would not expect the error.
Anyway, there is a bug in the metadata function error handling I fix in this PR: https://github.com/ceph/ceph/pull/19337
Note, with the fix it will still throw the exception in the case like yours, though the error will be different:
"ImageNotFound: [errno 2] error getting metadata backup-skip for image ...". You will need to catch the exception if you want to tolerate non-existent keys.
Updated by Jason Dillaman over 6 years ago
- Status changed from In Progress to Pending Backport
Updated by Nathan Cutler over 6 years ago
- Copied to Backport #22376: luminous: Python RBD metadata_get does not work. added
Updated by Nathan Cutler about 6 years ago
- Status changed from Pending Backport to Resolved
Actions