summaryrefslogtreecommitdiff
path: root/src/rabbit_upgrade.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit_upgrade.erl')
-rw-r--r--src/rabbit_upgrade.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_upgrade.erl b/src/rabbit_upgrade.erl
index 420aa205..a1e116a0 100644
--- a/src/rabbit_upgrade.erl
+++ b/src/rabbit_upgrade.erl
@@ -16,7 +16,8 @@
-module(rabbit_upgrade).
--export([maybe_upgrade_mnesia/0, maybe_upgrade_local/0, secondary_upgrade/1]).
+-export([maybe_upgrade_mnesia/0, maybe_upgrade_local/0,
+ nodes_running/1, secondary_upgrade/1]).
-include("rabbit.hrl").
@@ -122,8 +123,7 @@ remove_backup() ->
maybe_upgrade_mnesia() ->
AllNodes = rabbit_mnesia:cluster_nodes(all),
- Mode = upgrade_mode(AllNodes),
- ok = rabbit_mnesia_offline:maybe_complete_rename(Mode, AllNodes),
+ ok = rabbit_mnesia_offline:maybe_complete_rename(AllNodes),
case rabbit_version:upgrades_required(mnesia) of
{error, starting_from_scratch} ->
ok;
@@ -140,7 +140,7 @@ maybe_upgrade_mnesia() ->
ok;
{ok, Upgrades} ->
ensure_backup_taken(),
- ok = case Mode of
+ ok = case upgrade_mode(AllNodes) of
primary -> primary_upgrade(Upgrades, AllNodes);
secondary -> secondary_upgrade(AllNodes)
end