]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: make mirror properly detect pool replayer needs restart 45170/head
authorMykola Golub <mgolub@suse.com>
Fri, 18 Feb 2022 10:42:23 +0000 (10:42 +0000)
committerPonnuvel Palaniyappan <pponnuvel@gmail.com>
Fri, 25 Feb 2022 18:28:17 +0000 (18:28 +0000)
commit5b95c8303a936f81882f1cd81cde71bc6c3219f2
tree26285613bfa0b9844ebaf29c190b78cb1bb15467
parente4d372b5f29eb325dfb1260d189497bb9d60d342
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