diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2018-03-16 08:20:21 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2018-03-16 17:14:12 +0300 |
| commit | fb0f71b3e5523e7a0f0e4348d44cc14f0bc1ebdc (patch) | |
| tree | 96520d8ebb9ddf2ae03ffd2a93b9a42280d4b43a | |
| parent | 06afc7fe367e2635221b96ec5081b811c5883211 (diff) | |
| download | rabbitmq-server-git-fb0f71b3e5523e7a0f0e4348d44cc14f0bc1ebdc.tar.gz | |
Include current node to the to-start list
(cherry picked from commit 1ef32474b0bd414e157411df17744f5fc7e3e5a6)
| -rw-r--r-- | src/rabbit_vhost_sup_sup.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_vhost_sup_sup.erl b/src/rabbit_vhost_sup_sup.erl index 993f1d8430..e036a82e64 100644 --- a/src/rabbit_vhost_sup_sup.erl +++ b/src/rabbit_vhost_sup_sup.erl @@ -60,10 +60,10 @@ init([]) -> [rabbit_vhost_sup_wrapper, rabbit_vhost_sup]}]}}. start_on_all_nodes(VHost) -> - NodesStart = [ {Node, start_vhost(VHost, Node)} - || Node <- rabbit_nodes:all_running(), - %% Do not try to start a vhost on booting nodes. - rabbit:is_booted(Node) ], + %% Do not try to start a vhost on booting peer nodes + AllBooted = [Node || Node <- rabbit_nodes:all_running(), rabbit:is_booted(Node)], + Nodes = [node() | AllBooted], + NodesStarted = [{Node, start_vhost(VHost, Node)} || Node <- Nodes], Failures = lists:filter(fun ({_, {ok, _}}) -> false; ({_, {error, {already_started, _}}}) -> false; |
