Project

General

Profile

Actions

Bug #22306

closed

Python RBD metadata_get does not work.

Added by Марк Коренберг over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% 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 1 (0 open1 closed)

Copied to rbd - Backport #22376: luminous: Python RBD metadata_get does not work.ResolvedNathan CutlerActions
Actions #1

Updated by Patrick Donnelly over 6 years ago

  • Project changed from Ceph to rbd
Actions #2

Updated by Mykola Golub over 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Mykola Golub
Actions #3

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.
Actions #4

Updated by Mykola Golub over 6 years ago

  • Backport set to luminous
Actions #5

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.

Actions #6

Updated by Jason Dillaman over 6 years ago

  • Status changed from In Progress to Pending Backport
Actions #7

Updated by Nathan Cutler over 6 years ago

  • Copied to Backport #22376: luminous: Python RBD metadata_get does not work. added
Actions #8

Updated by Nathan Cutler about 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF