Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
librbd: permit removal of image being bootstrapped by rbd-mirror #12549
@trociny I see some random error messages popping up in the rbd-mirror daemon logs, which could be awkward if running "systemctl status rbd-mirror@XYZ" and you see lots of false errors listed. I think if this PR is combined w/ my PR for listening to the add/remove mirroring events, it might vastly reduce the chance for such false errors since the bootstrap will be canceled nearly immediately when the "DISABLING" event is received. Perhaps remove should wait for all rbd-mirror watchers to disappear before proceeding (and time-out after X seconds if they don't)? Maybe I am thinking too much into it and we can deal with that later.
@dillaman So, do you propose before checking for watchers (or if the check returned positive) and the mirroring is enabled to send DISABLING event and (re) check the watchers (expecting that if it was due to bootstrap then it would be cancelled)? I can do this way, rebasing it on your PR #12364 (and adding necessary bootsrap cancel bits if needed).
On the other hand, we already send DISABLING event when disabling mirror before actually removing the image. So after the rbd-mirror is updated to cancel the bootstrap when receiving DISABLING event, I suppose the errors should gone with my current version too?
I don't have a strong opinion what is better though.