-
Notifications
You must be signed in to change notification settings - Fork 6k
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
librbd: enabling/disabling rbd feature should report missing dependency #12238
Conversation
lderr(cct) << "cannot disable exclusive lock" << dendl; | ||
lderr(cct) << "cannot disable exclusive-lock feature. feature " | ||
"object-map or journaling must be disabled " | ||
"before disabling exclusive-lock." << dendl; |
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.
minor: better to keep it as "cannot disable exclusive-lock. object-map and journaling ..." rather than using "feature" word everytime?
applies to changes elsewhere.
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.
Right, change available in next PR.
e1298d4
to
61d0790
Compare
@@ -189,7 +190,8 @@ Context *EnableFeaturesRequest<I>::handle_get_mirror_mode(int *result) { | |||
} | |||
if ((m_features & RBD_FEATURE_FAST_DIFF) != 0) { | |||
if ((m_new_features & RBD_FEATURE_OBJECT_MAP) == 0) { | |||
lderr(cct) << "cannot enable fast diff" << dendl; | |||
lderr(cct) << "cannot enable fast-diff. object-map must be" | |||
" enabled before enabling fast-diff" << dendl; |
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.
Nit: move the space back to the end of the previous line's string. Comment applies below as well.
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.
done
@@ -190,7 +192,8 @@ Context *DisableFeaturesRequest<I>::handle_acquire_exclusive_lock(int *result) { | |||
} | |||
if ((m_features & RBD_FEATURE_OBJECT_MAP) != 0) { | |||
if ((m_new_features & RBD_FEATURE_FAST_DIFF) != 0) { | |||
lderr(cct) << "cannot disable object map" << dendl; | |||
lderr(cct) << "cannot disable object-map. fast-diff must be " | |||
"disabled before disabling object-map" << dendl; |
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.
Nit: inconsistent use of periods -- add a period to the end of the last sentence here and below where needed.
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.
done
Currently while enabling or disabling rbd feature command does not give missing dependency for eg: attempting to enable the journaling feature on an image that doesn't have the exclusive-lock feature enabled should give missing dependency error message. Fixes: http://tracker.ceph.com/issues/16985 Reported-by: Jason Dillaman <dillaman@redhat.com> Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
61d0790
to
bd023cf
Compare
retest this please |
jenkins test this please (https://jenkins.ceph.com/job/ceph-pull-requests/15202/consoleText unittest_ceph_crypto) |
Currently while enabling or disabling rbd feature command does not
give missing dependency for eg: attempting to enable the journaling
feature on an image that doesn't have the exclusive-lock feature
enabled should give missing dependency error message.
Fixes: http://tracker.ceph.com/issues/16985
Reported-by: Jason Dillaman dillaman@redhat.com
Signed-off-by: Gaurav Kumar Garg garg.gaurav52@gmail.com