mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
rbd-mirror: fix bootstrap sequence while the image is removed
If the image is being removed the PrepareRemoteImageRequest was returning the same error if the image was disabled or non primary which doesn't allow the BootstrapRequest to have the correct error handling. This commit fix this behavior by considering that the remote image is already deleted if the image is in disabling state. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
This commit is contained in:
parent
35398a5e17
commit
ff60aec2d9
@ -664,7 +664,7 @@ TYPED_TEST(TestImageReplayer, BootstrapMirrorDisabling)
|
||||
this->create_replayer();
|
||||
C_SaferCond cond;
|
||||
this->m_replayer->start(&cond);
|
||||
ASSERT_EQ(-EREMOTEIO, cond.wait());
|
||||
ASSERT_EQ(-ENOENT, cond.wait());
|
||||
ASSERT_TRUE(this->m_replayer->is_stopped());
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ void PrepareRemoteImageRequest<I>::handle_get_mirror_info(int r) {
|
||||
return;
|
||||
} else if (m_mirror_image.state == cls::rbd::MIRROR_IMAGE_STATE_DISABLING) {
|
||||
dout(5) << "remote image mirroring is being disabled" << dendl;
|
||||
finish(-EREMOTEIO);
|
||||
finish(-ENOENT);
|
||||
return;
|
||||
} else if (m_promotion_state != librbd::mirror::PROMOTION_STATE_PRIMARY &&
|
||||
(state_builder == nullptr ||
|
||||
|
Loading…
Reference in New Issue
Block a user