Skip to content

Commit 9299311

Browse files
committed
rbd: write image mirror status if state is CREATING
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 <[email protected]> (cherry picked from commit 25a8de9)
1 parent 1886028 commit 9299311

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cls/rbd/cls_rbd.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5073,7 +5073,8 @@ int image_status_set(cls_method_context_t hctx, const string &global_image_id,
50735073
if (r < 0) {
50745074
return 0;
50755075
}
5076-
if (mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED) {
5076+
if (mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED &&
5077+
mirror_image.state != cls::rbd::MIRROR_IMAGE_STATE_CREATING) {
50775078
return 0;
50785079
}
50795080

0 commit comments

Comments
 (0)