]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd-mirror: don't expect image map is always initialized
authorMykola Golub <mgolub@suse.com>
Mon, 17 Feb 2020 12:11:59 +0000 (12:11 +0000)
committerMykola Golub <mgolub@suse.com>
Mon, 17 Feb 2020 12:11:59 +0000 (12:11 +0000)
commitd916b0948bf8a5a06afb9a63188f6efa2121510d
treed7b18a14d05ee4aa45ae7c20f527e09f9f7ea1f9
parent620f0ea103fa8576fb680936c4f793b7bc5d5a5e
rbd-mirror: don't expect image map is always initialized

in a namespace replayer when handling "instances added/removed"
event. It is possible an event comes when a pool replayer has
already created and initialized a new namespace replayer but has
not acquired leader for it (image_map is not initialized yet).

Also, make sure `m_image_map` is set only after its
initialization is complete.

Fixes: https://tracker.ceph.com/issues/44161
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/tools/rbd_mirror/NamespaceReplayer.cc
src/tools/rbd_mirror/NamespaceReplayer.h