Actions
Bug #23038
closedrbd: import with option --export-format fails to protect snapshot
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Following up on this mailing list thread http://lists.ceph.com/pipermail/ceph-users-ceph.com/2018-February/024707.html.
After exporting an rbd image with --export-format 2 and importing it back to the same or a different pool with "rbd import --export-format 2" the snapshot of the newly imported image is not protected although the original snapshot is protected:
ceph1:~ # rbd info images/image1 rbd image 'image1': size 11811 kB in 3 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.376674b0dc51 format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten flags: create_timestamp: Mon Feb 19 15:55:51 2018 ceph1:~ # rbd snap create images/image1 --snap snap ceph1:~ # rbd snap protect images/image1@snap ceph1:~ # rbd info images/image1@snap rbd image 'image1': size 11811 kB in 3 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.376674b0dc51 format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten flags: create_timestamp: Mon Feb 19 15:55:51 2018 protected: True ceph1:~ # rbd export --export-format 2 images/image1 image1 Exporting image: 100% complete...done. ceph1:~ # rbd import --export-format 2 image1 images/image2 Importing image: 100% complete...done. ceph1:~ # rbd info images/image2@snap rbd image 'image2': size 11811 kB in 3 objects order 22 (4096 kB objects) block_name_prefix: rbd_data.3773643c9869 format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten flags: create_timestamp: Mon Feb 19 16:01:05 2018 protected: False ceph1:~ # ceph --version ceph version 12.2.0-296-g706f78da1a (706f78da1a7c72241fae3262643824cbd8710d03) luminous (stable)
Actions