From 7d3a4b0e0f5a3eb5f20051c8a9b1a80b71df4016 Mon Sep 17 00:00:00 2001 From: glyn Date: Wed, 7 May 2014 12:52:22 +0100 Subject: [PATCH] Move set should check for active nodes, not inactive as state can also be failed --- slony_failover.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) "; } -- 2.39.2