Bug 1324012

Summary: [RBD] rbd clone command not accepting --image-feature option
Product: Red Hat Ceph Storage Reporter: Tejas <tchandra>
Component: RBDAssignee: Josh Durgin <jdurgin>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: ceph-eng-bugs, jdillama
Target Milestone: rcKeywords: Reopened
Target Release: 2.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-05 15:44:29 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:

Description Tejas 2016-04-05 10:42:32 UTC
Description of problem:


Version-Release number of selected component (if applicable):
ceph version 10.1.0-1.el7cp (61adb020219fbad4508050b5f0a792246ba74dae)

How reproducible:
Always

Steps to Reproduce:
1. Create an RBD image
2. Crate a snap on the image and protect it.
3. Try to create a clone on the snap   by specifying any feature

Actual results:
[root@magna009 yum.repos.d]# rbd ls -l Tejas
NAME                  SIZE PARENT                   FMT PROT LOCK 
cln1               102400M Tejas/img1@s1              2           
cln1@sc1           102400M Tejas/img1@s1              2           
cln3               102400M                            2           
cln3@sc3           102400M Tejas/img1@s3              2           
clone               10240M                            2           
clone@new-snap      10240M Tejas/test1@test-renamed   2           
img1               102400M                            2           
img1@s1            102400M                            2 yes       
img1@s2            102400M                            2           
img1@s3            102400M                            2 yes       
new                 10240M                            2           
new@new1            10240M                            2 yes       
test                10240M                            2           
test@test-snap      10240M                            2           
test1               10240M                            2           
test1@test-renamed  10240M                            2 yes


rbd clone Tejas/new@new1 Tejas/new-clone --image-feature object-map
rbd: clone error: (22) Invalid argument

rbd clone Tejas/new@new1 Tejas/new-clone --image-feature deep-flatten
rbd: clone error: (22) Invalid argument

Expected results:
Clone creation should succeed


Setup:
mons:
magna009
magna031
magna046

osd:
magna052
magna058
magna077

Comment 2 Jason Dillaman 2016-04-05 13:27:19 UTC
The "--image-feature" option specifies all features you want enabled on an image (i.e. it's not additive).  In this case, cloning requires the "layering" feature.  Additionally, even if you specified the "layering" feature, you cannot enable object map without "exclusive-lock".

Comment 3 Tejas 2016-04-05 13:41:59 UTC
what is the procedure to enable deep-flattening on a clone?
Is there any other commands to enable deep-flattenig?

Comment 4 Jason Dillaman 2016-04-05 14:00:05 UTC
"--image-feature layering,deep-flatten" or "--image-feature layering --image-feature deep-flatten"

Comment 5 Tejas 2016-04-05 14:56:21 UTC
Jason,

That is exactly what I am trying :

rbd clone Tejas/new@new1 Tejas/new-clone --image-feature deep-flatten
rbd: clone error: (22) Invalid argument

layering is already enabled on the clone.
But deep-flatteing is failing.

Comment 6 Tejas 2016-04-05 15:31:13 UTC
based on my comment above, we are still unable to proceed with deep-flatten testing.
Hence I am reopening this bug. 
We may need some more clarity on this.

Comment 7 Jason Dillaman 2016-04-05 15:44:29 UTC
Your CLI arguments are invalid as described above. Closing again.