It can take upto 30s for the image mirror status to be written
to rbd_mirroring on the secondary for a newly created image. This fix
attempts to reduce the time by writing the status to rbd_mirroring even
if the image state is set to CREATING.
Fixes: https://tracker.ceph.com/issues/71138
Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
(cherry picked from commit
25a8de9c3db8309387eed3502e781872bc1e035e)
if (r < 0) {
return 0;
}
- if (mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED) {
+ if (mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED &&
+ mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_CREATING) {
return 0;
}