X-Git-Url: https://git.openstreetmap.org./dns.git/blobdiff_plain/c1aae85417129e1447c90e3b6578a3e55d1f2e0e..17b82ebd1c72b5b7fbd149c135e42db41f491d33:/bin/mkgeo?ds=inline diff --git a/bin/mkgeo b/bin/mkgeo index 2b7d3af..2c0453b 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -35,7 +35,7 @@ while (my($name,$cluster) = each %$clusters) push @servers, $server; } } - else + elsif ($cluster->{requests} > 0) { my $server = { cluster => $cluster, @@ -50,6 +50,10 @@ while (my($name,$cluster) = each %$clusters) push @servers, $server; } + else + { + $cluster->{servers} = []; + } $cluster->{name} = $name; $cluster->{status} = "down"; @@ -145,6 +149,9 @@ foreach my $server (@servers) } } +# Abort if no servers at all are up +exit 0 unless grep { $_->{status} eq "up" } values(%$clusters); + # Create target origins object my $targetorigins = {};