]> git.8kb.co.uk Git - slony-i/slony_failover/commitdiff
Move set should check for active nodes, not inactive as state can also be failed
authorglyn <glyn@8kb.co.uk>
Wed, 7 May 2014 11:52:22 +0000 (12:52 +0100)
committerglyn <glyn@8kb.co.uk>
Wed, 7 May 2014 11:52:22 +0000 (12:52 +0100)
slony_failover.pl

index 32c938d00403490247b8a6b823001929d6c5b14c..672a1a4966c9c645a5179024b7a7e7f7049caad5 100644 (file)
@@ -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) ";
                         }