Project

General

Profile

Bug #23038

rbd: import with option --export-format fails to protect snapshot

Added by Eugen Block over 1 year ago. Updated over 1 year ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/19/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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)


Related issues

Copied to rbd - Backport #23640: luminous: rbd: import with option --export-format fails to protect snapshot Resolved

History

#1 Updated by Patrick Donnelly over 1 year ago

  • Project changed from Ceph to rbd
  • Subject changed from rbd import with option --export-format fails to protect snapshot to rbd: import with option --export-format fails to protect snapshot
  • Target version deleted (v12.2.0)
  • Affected Versions v12.2.2 added

#3 Updated by Mykola Golub over 1 year ago

  • Status changed from New to Need Review

#4 Updated by Jason Dillaman over 1 year ago

  • Status changed from Need Review to Pending Backport
  • Backport set to luminous

#5 Updated by Nathan Cutler over 1 year ago

  • Copied to Backport #23640: luminous: rbd: import with option --export-format fails to protect snapshot added

Also available in: Atom PDF