Bug #22306
Python 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'
Related issues
History
#1 Updated by Patrick Donnelly about 5 years ago
- Project changed from Ceph to rbd
#2 Updated by Mykola Golub about 5 years ago
- Status changed from New to In Progress
- Assignee set to Mykola Golub
#3 Updated by Mykola Golub about 5 years ago
- Subject changed from Python RBD metadata_get dows not work. to Python RBD metadata_get does not work.
#4 Updated by Mykola Golub about 5 years ago
- Backport set to luminous
#5 Updated by Mykola Golub about 5 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.
#6 Updated by Jason Dillaman about 5 years ago
- Status changed from In Progress to Pending Backport
#7 Updated by Nathan Cutler about 5 years ago
- Copied to Backport #22376: luminous: Python RBD metadata_get does not work. added
#8 Updated by Nathan Cutler about 5 years ago
- Status changed from Pending Backport to Resolved