]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: make mirror properly detect pool replayer needs restart 45169/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:27:55 +0000 (18:27 +0000)
commit7253819c97d895983ce3699b9c6f444a77490cdd
treec1fa777a3a61fa0fd2baf5bc4413e0899619b460
parent7516df7fec9d21581a28fd4addedfd8e4c26f0d9
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