From: glyn Date: Wed, 7 May 2014 11:52:22 +0000 (+0100) Subject: Move set should check for active nodes, not inactive as state can also be failed X-Git-Url: https://git.8kb.co.uk/?a=commitdiff_plain;h=7d3a4b0e0f5a3eb5f20051c8a9b1a80b71df4016;p=slony-i%2Fslony_failover Move set should check for active nodes, not inactive as state can also be failed --- diff --git a/slony_failover.pl b/slony_failover.pl index 32c938d..672a1a4 100644 --- a/slony_failover.pl +++ b/slony_failover.pl @@ -1168,7 +1168,7 @@ sub writeMoveSet { if (($subs) && ($g_resubscribe_method eq 'subscribe')) { foreach my $other_subs (@g_cluster) { - if (($other_subs->[6] ne "INACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) { + if (($other_subs->[6] eq "ACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) { if (exists $g_backups{$other_subs->[0]}) { $line_prefix = "# (Node $other_subs->[0] unavailable) "; @@ -1236,7 +1236,7 @@ sub writeMoveSet { if (($subs) && ($g_resubscribe_method eq 'resubscribe')) { foreach my $other_subs (@g_cluster) { - if (($other_subs->[6] ne "INACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) { + if (($other_subs->[6] eq "ACTIVE") && ($other_subs->[0] != $from) && ($other_subs->[0] != $to)) { if (exists $g_backups{$other_subs->[0]}) { $line_prefix = "# (Node $other_subs->[0] unavailable) "; }