Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1208278

Summary: RBD snapshot, created while flattening image, is unremovable
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: ceph-eng-bugs <ceph-eng-bugs>
Status: CLOSED WONTFIX QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.2.3CC: ceph-eng-bugs, kdreyer, nlevine, tmuthami
Target Milestone: rc   
Target Release: 1.2.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 16:28:50 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: 1271774    
Bug Blocks:    

Description Jason Dillaman 2015-04-01 20:02:15 UTC
Description of problem:
Due to the decentralized approach to RBD image management, it is possible to snapshot an image which is being concurrently flattened.  Since the flatten operation would not have known about the new snapshot, it will detach the image from its parent (if no other snapshots exist).  

This will allow the parent image snapshot to be unprotected and removed since it doesn't know about the new dependent snapshot.

This condition exposes issues that can cause 'rbd ls -l' to crash due to the missing parent and prevents the removal of the corrupt snapshot.

How reproducible:
Race condition

Steps to Reproduce:
1. Clone an image from an origin snapshot
2. Flatten the clone
3. While flattening, snapshot the clone
4. Delete the origin snapshot and image

Actual results:
Orphaned snapshot cannot be removed, 'rbd ls -l' crashes.

Expected results:
Orphaned snapshot should be able to be removed, 'rbd ls -l' shouldn't crash.

Comment 1 Ken Dreyer (Red Hat) 2015-04-08 22:03:14 UTC
Removing the dependency on 1210037 - this is a bug to fix in 1.2.4.

Comment 2 Ken Dreyer (Red Hat) 2015-10-19 17:34:08 UTC
https://github.com/ceph/ceph/pull/4245 has shipped in v0.80.10 upstream, so we'll take in in as part of the RHCS 1.2 rebase to Ceph v0.80.11 (bz 1271774).

(For the record, this is a Firefly-only bug. The fix was present in the initial v0.94 release of Hammer.)

Comment 3 Ken Dreyer (Red Hat) 2015-12-08 16:28:50 UTC
Closing all RHCS 1.2 bugs, since we are not planning to do a formal RHCS 1.2.4 release.

This particular issue was already fixed in the initial RHCS 1.3.0 release.