Bug 1538317

Summary: "rbd snap rm --force" might corrupt snapshots of child images
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: Jason Dillaman <jdillama>
Status: CLOSED ERRATA QA Contact: Manohar Murthy <mmurthy>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0CC: ceph-eng-bugs, ceph-qe-bugs, hnallurv, jdillama, kdreyer, rperiyas
Target Milestone: z2Flags: mmurthy: needinfo+
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-12.2.4-1.el7cp Ubuntu: ceph_12.2.4-2redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-26 17:38:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1548067    
Bug Blocks:    

Description Jason Dillaman 2018-01-24 19:48:20 UTC
Description of problem:
If a snapshot is removed by "rbd snap rm --force" and is used by at least one cloned image that does *not* have the deep-flatten feature enabled and the clone has snapshots, the snapshot will be deleted and the clone's snapshot will most likely be corrupt since the parent image's snapshot has been deleted.

Version-Release number of selected component (if applicable):
12.2.x

How reproducible:
100%

Steps to Reproduce:
1. create a clone w/ deep-flatten disabled
2. create a snapshot within the clone
3. use "rbd snap rm --force <parent-snap-spec>"

Actual results:
The parent snapshot will be removed while the clone's snapshot still references the parent snapshot. 

Expected results:
The force removal should be prohibited if deep-flatten isn't enabled on child images w/ snapshots.

Comment 14 errata-xmlrpc 2018-04-26 17:38:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1259