X-Git-Url: https://git.openstreetmap.org./dns.git/blobdiff_plain/c1aae85417129e1447c90e3b6578a3e55d1f2e0e..e35bf040ef720bfe8eac259fca5c874009239e05:/bin/mkgeo 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 = {};