]> git.openstreetmap.org Git - dns.git/commitdiff
Ignore geodns clusters with a zero request limit
authorTom Hughes <tom@compton.nu>
Sun, 30 Jul 2023 09:14:20 +0000 (10:14 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 30 Jul 2023 09:14:20 +0000 (10:14 +0100)
bin/mkgeo

index 2b7d3af5be9f84564930313f78dbb920b5195ab3..9a36ae23096bafa6a03aca5bb5b1e22200fcadde 100755 (executable)
--- 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";