New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbd: inherit the parent image features when cloning an image #9334
Conversation
@yangdongsheng Recently this fix to librbd::clone has been committed to master: Could you please retest that it fixes this issue too? If it does not I believe we should fix this on API level, not CLI. |
Actually, looking at it more closely, we still need modification in |
@trociny yea, good point. we should put this work into API function, otherwise, we have to do the same thing at every caller of this api. thanx, will update it soon. |
@yangdongsheng Actually API functions should already work. I pointed you to the latest fix for clone. So I expect some work is only required to modify |
d570a04
to
368fa3b
Compare
Hi @trociny sorry for the late. yes, API side is almost ready, but there is something we should do for other options in clone. I have pushed some commits for them. Please help to check again. Thanx |
I admit I have been only glancing the changes so far, but this additional logic for rbd Ideally, I would like @yangdongsheng have you tried this? Do you see any reason why this wouldn't work? @dillaman what do you think? |
I agree with @trociny |
4e3b6f2
to
184c9fb
Compare
should process --image-shared flag https://github.com/ceph/ceph/blob/master/src/tools/rbd/Utils.cc#L415 |
@xinxinsh Yes, good, thanx. |
184c9fb
to
330d392
Compare
@trociny what about this version? |
The job was reported failed beause of my work on the CI. |
return -EINVAL; | ||
} | ||
features &= ~RBD_FEATURE_STRIPINGV2; | ||
stripe_specified = true; | ||
} | ||
|
||
if (vm.count(at::IMAGE_SHARED) && vm[at::IMAGE_SHARED].as<bool>()) { | ||
features &= ~RBD_FEATURES_SINGLE_CLIENT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The features
haven't potentially been initialized to the default feature set at this time if !features_specified
cff5acc
to
74a8078
Compare
@dillaman Updated. thanx |
Hopefully the last of the test failures: |
@dillaman Oh, sorry about it. It seems I have to setup a local integration testing environment for a fully testing now. Thanx for your help. |
@dillaman I found I can't reproduce the fail by run @yuriw could you help to take this PR into your testing? thanx. |
@yangdongsheng You don't need to set CEPH_* env variables, just run:
But make sure your PATH is set correctly and the script runs your binary and lib:
Also you can try to reproduce manually, basically it failed on this:
From teuthology.log it failed reporting that journaling feature was not enabled for the image. Does it work for you? Another alarming message in teuthology.log: "rbd: image format 1 is deprecated" after |
The 74a8078 is the commit ID of this branch. Thanx @trociny I manually tested my patch as above. is that same to you? In addition, I tried the xml format.
|
Oh, so we should create test in format 1 what might be the default in this case. I see the problem now. I guess the |
@yangdongsheng Actually, I don't see rbd_default_format is explicitly set in that test, and there many other tests from that teuthology run where this warning was observed. And this is the main question: why it uses old format here as default? Don't you observe this in your local environment (don't you have rbd_default_format = 2 explicitly set in your config)? I have not built your branch yet, so can't recheck this in my env. |
@trociny I tried my local env again. I did not observe the deprecating warning in creating.
|
…s(). Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
… options specified Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
…options specified Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
…overwriting. Currently, if we want to use the default options for rbd, we need to omit the RBD_IMAGE_OPTION_FEATURES, but if we want --image-shared. we need to overwrite something bese on the default value of image options. This patch introduce two flags in image_options, RBD_IMAGE_OPTION_FEATURES_SET means, we want to set something after you get the features from default, parent or user. And RBD_IMAGE_OPTION_FEATURES_CLEAR will do a bit clear. Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
…ecified. Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
… creating Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
… cloning Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
… copying Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
74a8078
to
6264acb
Compare
Okey, I found the problem now, there is an uninitialized variable of format. when getting format in creating. |
Fixes: http://tracker.ceph.com/issues/15388