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->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());
}
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 ||