From 1ca9b7aa65b7d8991836c1903eae3780c0a5f8be Mon Sep 17 00:00:00 2001 From: Devops Date: Fri, 7 Jul 2017 17:01:48 +0100 Subject: [PATCH] bin/ovh-api --- bin/ovh-api | 2 ++ 1 file changed, 2 insertions(+) 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') { -- 2.47.3