From: Tom Hughes Date: Fri, 6 Dec 2019 09:10:30 +0000 (+0000) Subject: Only include servers which are up in the weighted server list X-Git-Url: https://git.openstreetmap.org./dns.git/commitdiff_plain/f940aa881391ea62e9622c7068255c612238743d Only include servers which are up in the weighted server list --- diff --git a/bin/mkgeo b/bin/mkgeo index 6868af0..2e0ac00 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -339,10 +339,13 @@ if (defined($gdnsname)) while (my($index,$server) = each @{$cluster->{servers}}) { - my $number = sprintf("%02d", $index + 1); - my $bandwidth = $server->{bandwidth}; + if ($server->{status} eq "up") + { + my $number = sprintf("%02d", $index + 1); + my $bandwidth = $server->{bandwidth}; - $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}., ${bandwidth} ]\n"); + $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}., ${bandwidth} ]\n"); + } } $gdnsweightedfile->print("}\n");