Skip to content
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

Merged
merged 1 commit into from Dec 2, 2016

Conversation

gaurav36
Copy link
Contributor

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

@vshankar vshankar added the rbd label Dec 1, 2016
@vshankar vshankar changed the title rbd: enabling/disabling rbd feature should report missing dependency librbd: enabling/disabling rbd feature should report missing dependency Dec 1, 2016
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;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@@ -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;
Copy link

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.

Copy link
Contributor Author

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;
Copy link

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.

Copy link
Contributor Author

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>
@dillaman
Copy link

dillaman commented Dec 2, 2016

retest this please

@ghost
Copy link

ghost commented Dec 2, 2016

jenkins test this please (https://jenkins.ceph.com/job/ceph-pull-requests/15202/consoleText unittest_ceph_crypto)

@dillaman dillaman merged commit 350a660 into ceph:master Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants