From: Devops Date: Fri, 7 Jul 2017 16:01:48 +0000 (+0100) Subject: bin/ovh-api X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=1ca9b7aa65b7d8991836c1903eae3780c0a5f8be;p=nb.git bin/ovh-api --- diff --git a/bin/ovh-api b/bin/ovh-api index 31541708..6fcbdafe 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -92,9 +92,11 @@ sub ip_routed { my $rec = query("/ip/$ip") or exit 1; my @routed; my %dbl; + my @ips = ips(); if ($rec->{type} =~ /^(failover|dedicated)$/) { push @routed, [ $rec->{routedTo}{serviceName}, 'master' ]; + push @routed, [ hostname(), 'slave' ] if grep {$_ eq $ip} @ips; } elsif ($rec->{type} eq 'loadBalancing') {