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
Conversation
@@ -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); |
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.
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.
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.
I agree
Fixed commit |
lderr(cct) << "cannot disable mirroring: " << cpp_strerror(r) << dendl; | ||
return r; | ||
} | ||
else if (r == -ENOENT) { |
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: else should be on the same line as } and {
…is removed Signed-off-by: Ricardo Dias <rdias@suse.com> Fixes: ceph#15265
@jdurgin fixed :) |
Fixes: #15265
Ticket url: http://tracker.ceph.com/issues/15265