]> git.openstreetmap.org Git - dns.git/commitdiff
Don't write an entry to the weighted lookup when all servers are down
authorTom Hughes <tom@compton.nu>
Sat, 18 Apr 2020 23:27:40 +0000 (00:27 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 18 Apr 2020 23:27:40 +0000 (00:27 +0100)
bin/mkgeo

index 8cb4687e124fca590eece9372e4d28d55d7a74fa..0b38881a65bc6287606baa87274ce639d6d1d46b 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -339,7 +339,7 @@ if (defined($gdnsname))
     {
         my $name = $cluster->{name};
 
-        if (@{$cluster->{servers}} > 1)
+        if (@{$cluster->{servers}} > 1 && grep { $_->{status} eq "up" } @{$cluster->{servers}})
         {
             $gdnsweightedfile->print("${name} => {\n");