]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: make mirror properly detect pool replayer needs restart 45129/head
authorMykola Golub <mgolub@suse.com>
Fri, 18 Feb 2022 10:42:23 +0000 (10:42 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 23 Feb 2022 13:26:20 +0000 (14:26 +0100)
commit44b9d1daa90fdbdc7e4188944f673c90ebec7ab9
treed4b7c0f9807c497e727f147804b89b5cde6607ec
parent9d7341a046f03f89d581cb3194d3a234c8c00074
rbd-mirror: make mirror properly detect pool replayer needs restart

When a PoolReplayer detects remote pool metadata change it
sets "stopping" flag expecting the Mirror will restart it.

Although setting "stopping" flag makes the PoolReplayer::run
thread to terminate, the thread's is_started function will still
return true until join is called (and reset the thread id).

This made impossible for the Mirror to detect (by calling
PoolReplayer::is_running) that the PoolReplayer needed restart.

Fixes: https://tracker.ceph.com/issues/54258
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit ad4a2990b87834fe4ae8c9111547d071aa6e75e5)
src/tools/rbd_mirror/PoolReplayer.cc