summaryrefslogtreecommitdiffstats
path: root/src/tools/rbd_mirror/LeaderWatcher.h
diff options
context:
space:
mode:
authorJason Dillaman <dillaman@redhat.com>2018-03-09 02:12:37 +0100
committerJason Dillaman <dillaman@redhat.com>2018-04-10 22:31:32 +0200
commitcca3a9b73d4ed3ed3806ff3b9e682cde7bab64e6 (patch)
tree25362e577bf4199b2fff5f398ba11151aedd8063 /src/tools/rbd_mirror/LeaderWatcher.h
parentrbd-mirror: moved leader watcher listener interface out of templated class (diff)
downloadceph-cca3a9b73d4ed3ed3806ff3b9e682cde7bab64e6.tar.xz
ceph-cca3a9b73d4ed3ed3806ff3b9e682cde7bab64e6.zip
rbd-mirror: leader watcher should always initialize status watcher
In the case of active/active, both the leader and the followers will be sending status updates for their images. Therefore, all rbd-mirror daemons should be registered. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/tools/rbd_mirror/LeaderWatcher.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/tools/rbd_mirror/LeaderWatcher.h b/src/tools/rbd_mirror/LeaderWatcher.h
index d7f5732796e..e1149960208 100644
--- a/src/tools/rbd_mirror/LeaderWatcher.h
+++ b/src/tools/rbd_mirror/LeaderWatcher.h
@@ -51,13 +51,16 @@ private:
* @verbatim
*
* <uninitialized> <------------------------------ WAIT_FOR_TASKS
- * | (init) ^ ^
- * v * |
- * CREATE_OBJECT * * (error) UNREGISTER_WATCH
- * | * ^
- * v * |
- * REGISTER_WATCH * * SHUT_DOWN_LEADER_LOCK
- * | ^
+ * | (init) ^ ^
+ * v * |
+ * CREATE_OBJECT * * * * * (error) UNREGISTER_WATCH
+ * | * ^
+ * v * |
+ * REGISTER_WATCH * * * * * SHUT_DOWN_STATUS_WATCHER
+ * | * ^
+ * v * |
+ * INIT_STATUS_WATCHER * * SHUT_DOWN_LEADER_LOCK
+ * | |
* | (no leader heartbeat and acquire failed) |
* | BREAK_LOCK <-------------------------------------\ |
* | | (no leader heartbeat) | | (shut down)
@@ -73,16 +76,14 @@ private:
* | * ^
* ....|...................*.................... .....|.....................
* . v * . . | post_release .
- * .INIT_STATUS_WATCHER * * (error) . .NOTIFY_LOCK_RELEASED .
- * . | ^ . .....^.....................
- * . v (error) | . |
- * .INIT_INSTANCES *> SHUT_DOWN_STATUS_WATCHER . RELEASE_LEADER_LOCK
+ * .INIT_INSTANCES * * * * * . .NOTIFY_LOCK_RELEASED .
+ * . | . .....^.....................
+ * . v . |
+ * .NOTIFY_LISTENER . RELEASE_LEADER_LOCK
* . | . ^
* . v . .....|.....................
- * .NOTIFY_LISTENER . .SHUT_DOWN_STATUS_WATCHER .
- * . | . . ^ .
- * . v . . | .
- * .NOTIFY_LOCK_ACQUIRED post_acquire . .SHUT_DOWN_INSTANCES .
+ * .NOTIFY_LOCK_ACQUIRED . . | .
+ * . | post_acquire . .SHUT_DOWN_INSTANCES .
* ....|........................................ . ^ .
* v . | .
* <leader> -----------------------------------> .NOTIFY_LISTENER .