From fd06d5bb7974a4ce6bde7d86ab9f2c3083f2b39c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 19 Apr 2020 00:27:40 +0100 Subject: [PATCH] Don't write an entry to the weighted lookup when all servers are down --- bin/mkgeo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mkgeo b/bin/mkgeo index 8cb4687..0b38881 100755 --- 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"); -- 2.39.5