mirror of https://github.com/schoebel/mars
marsadm: directly switch back to former primary
Use the new knowledge about old primary. This is only relevant for people who are consistently ignoring mars-manual.pdf which clearly states that intermediate "marsadm secondary" should not be used at all, except for the last step in final destruction of a resource.
This commit is contained in:
parent
79a1d20c69
commit
6559c534be
|
@ -1151,6 +1151,10 @@ sub try_to_avoid_splitbrain {
|
|||
}
|
||||
}
|
||||
}
|
||||
if ($primary && $primary eq $host) {
|
||||
lprint "Switching back to last primary.\n";
|
||||
last;
|
||||
}
|
||||
# if the old primary is known, we can ignore all other / unrelated hosts
|
||||
if ($primary && $primary ne $host && $primary ne "(none)") {
|
||||
my $p_path = sprintf("$mars/resource-$res/version-%09d-%s", $max, $primary);
|
||||
|
|
Loading…
Reference in New Issue