diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2013-11-11 14:22:57 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2013-11-11 14:22:57 +0000 |
| commit | 0928791ed9b96000febeb33d9ae7d441a66cc07f (patch) | |
| tree | d348c2967f8ff81ea841e09728f9d3cccebd954f /src | |
| parent | ccb1b07a582dc47a9498cc7958ce2ccf277e0a65 (diff) | |
| download | rabbitmq-server-git-0928791ed9b96000febeb33d9ae7d441a66cc07f.tar.gz | |
Re-add the log invocations we lost. This does lead to the stale master pid warning getting logged on a different node (the slave node rather than the node that attempted to start the slave) but I doubt we care about that.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 7 | ||||
| -rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index 47a4427801..c53ad7b915 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -184,14 +184,15 @@ add_mirror(QName, MirrorNode) -> end end). -start_child(_Name, MirrorNode, Q) -> - %% TODO re-add some log stuff here. +start_child(Name, MirrorNode, Q) -> case rabbit_misc:with_exit_handler( rabbit_misc:const(down), fun () -> rabbit_mirror_queue_slave_sup:start_child(MirrorNode, [Q]) end) of - {ok, SPid} -> rabbit_mirror_queue_slave:go(SPid); + {ok, SPid} -> rabbit_log:info("Adding mirror of ~s on node ~p: ~p~n", + [rabbit_misc:rs(Name), MirrorNode, SPid]), + rabbit_mirror_queue_slave:go(SPid); _ -> ok end. diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index aa69aeed0a..69e68d2046 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -134,6 +134,9 @@ handle_go({not_started, Q = #amqqueue { name = QName }} = NotStarted) -> rabbit_mirror_queue_misc:maybe_auto_sync(Q1), {noreply, State}; {stale, StalePid} -> + rabbit_log:warning("Detected stale HA master while adding " + "mirror of ~s: ~p~n", + [rabbit_misc:rs(QName), StalePid]), gm:leave(GM), {stop, {stale_master_pid, StalePid}, NotStarted}; duplicate_live_master -> |
