diff --git a/internal/catalogue/resolver_manifests_test.go b/internal/catalogue/resolver_manifests_test.go index 32415c6a..8825615c 100644 --- a/internal/catalogue/resolver_manifests_test.go +++ b/internal/catalogue/resolver_manifests_test.go @@ -51,7 +51,10 @@ func TestTheResolverForwardsToFixedUpstreamsAndNeverReadsResolvConf(t *testing.T "\nno-resolv\n", "\nserver=1.1.1.1\n", "\nserver=8.8.8.8\n", // The private address and loopback, never a LAN's (novox/hq ADR 0194): a device that is not a // member cannot reach what the mesh's names point at. - "\nlisten-address=127.0.0.1\n", "\nlisten-address=${machine:address}\n", "\nbind-dynamic\n", + "\nlisten-address=127.0.0.1\n", "\nlisten-address=${machine:address}\n", + // Each address bound once, at start, never closed (novox/hq issue 348, with mesh-catalog PR 161): + // bind-dynamic closed the private address's listener when a bridge teardown failed its re-read. + "\nbind-interfaces\n", // No hosts file and no operator's files: the mesh's resolver answers every node (ADR 0199). "\nno-hosts\n", "\nconf-file=" + m.Facts["zones"].Path + "\n", @@ -62,6 +65,9 @@ func TestTheResolverForwardsToFixedUpstreamsAndNeverReadsResolvConf(t *testing.T t.Errorf("the resolver's configuration lacks %q:\n%s", strings.TrimSpace(want), config) } } + if strings.Contains(config, "\nbind-dynamic\n") { + t.Error("the resolver binds dynamically, and closes a listener whenever a re-read of the addresses fails (issue 348)") + } // By address and never by interface: dnsmasq admits a query by the interface it arrives on // when told one, and a container's query to the private address arrives on the runtime's // bridge — `interface=mesh0` dropped every such query, silently (novox/hq issue 110).