summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2016-08-02 10:52:34 -0700
committerMichael Klishin <mklishin@pivotal.io>2016-08-02 10:52:34 -0700
commited4fe7e663447a61a92089cc033c5c87c8d757fb (patch)
tree847362af42cf4a5b79fbc9aa62f6fc2fe95d410a /src
parent747b41a9d3794706390b21003eb4bf6929422213 (diff)
parent22d451a12ff0bbc68b7cc9b7f9433662e8977d95 (diff)
downloadrabbitmq-server-git-ed4fe7e663447a61a92089cc033c5c87c8d757fb.tar.gz
Merge branch 'master' into rabbitmq-server-500-squashed
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control_main.erl9
-rw-r--r--src/rabbit_mnesia.erl2
-rw-r--r--src/rabbit_queue_location_validator.erl4
3 files changed, 10 insertions, 5 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl
index c56e519fe5..0e377b7c3c 100644
--- a/src/rabbit_control_main.erl
+++ b/src/rabbit_control_main.erl
@@ -1003,6 +1003,9 @@ nodes_in_cluster(Node, Timeout) ->
unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running], Timeout).
alarms_by_node(Name) ->
- Status = unsafe_rpc(Name, rabbit, status, []),
- {_, As} = lists:keyfind(alarms, 1, Status),
- {Name, As}.
+ case rpc_call(Name, rabbit, status, []) of
+ {badrpc,nodedown} -> {Name, [nodedown]};
+ Status ->
+ {_, As} = lists:keyfind(alarms, 1, Status),
+ {Name, As}
+ end.
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 88ea3a80f5..0c46193ca3 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -58,7 +58,7 @@
%% Main interface
-spec init() -> 'ok'.
-spec join_cluster(node(), node_type())
- -> 'ok' | {'ok', 'already_member'}.
+ -> ok | {ok, already_member} | {error, {inconsistent_cluster, string()}}.
-spec reset() -> 'ok'.
-spec force_reset() -> 'ok'.
-spec update_cluster_nodes(node()) -> 'ok'.
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl
index 44394a962c..c5aad50e64 100644
--- a/src/rabbit_queue_location_validator.erl
+++ b/src/rabbit_queue_location_validator.erl
@@ -26,7 +26,9 @@
{mfa, {rabbit_registry, register,
[policy_validator,
<<"queue-master-locator">>,
- ?MODULE]}}]}).
+ ?MODULE]}},
+ {requires, rabbit_registry},
+ {enables, recovery}]}).
validate_policy(KeyList) ->
case proplists:lookup(<<"queue-master-locator">> , KeyList) of