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: disable image mirroring when image is removed #8375

Merged
merged 1 commit into from Mar 30, 2016

Conversation

rjfd
Copy link
Contributor

@rjfd rjfd commented Mar 30, 2016

@@ -1943,6 +1943,19 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force) {
return r;
}

if (!old_format) {
r = mirror_image_disable_internal(ictx, true);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want false for the force flag. If the image isn't primary, it is probably being replicated. If a delete is truly desired, promote it first or delete the primary image and let the deletion propagate over to the peer cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

@dillaman dillaman changed the title rbd: rbd-mirroring: Disable image mirroring when image is removed librbd: disable image mirroring when image is removed Mar 30, 2016
@rjfd
Copy link
Contributor Author

rjfd commented Mar 30, 2016

Fixed commit

lderr(cct) << "cannot disable mirroring: " << cpp_strerror(r) << dendl;
return r;
}
else if (r == -ENOENT) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: else should be on the same line as } and {

…is removed

Signed-off-by: Ricardo Dias <rdias@suse.com>
Fixes: ceph#15265
@rjfd
Copy link
Contributor Author

rjfd commented Mar 30, 2016

@jdurgin fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants