Watch
0
0
Fork
You've already forked hyperhive
0

the bridge resolver answers other record types for its own names locally instead of waiting on an upstream

This commit is contained in:
atlas 2026-11-05 16:04:40 +01:00
commit 89bbeb9757

View file

@ -364,6 +364,21 @@ let
&& allLocal.services.hyperhive.otel.collector.host == "hive-collector.hive"
&& lib.elem "/hive-collector.hive/${bridge}" allLocal.services.dnsmasq.settings.address;
}
{
# An `address=` rule alone sends the other record types upstream
# (dnsmasq 2.86), so each of its domains is also `local=`, and no other
# domain is: `local=` on a domain with public records would hide them.
name = "the resolver keeps queries for every domain it answers itself, and only those, off the upstream";
ok =
let
s = allLocal.services.dnsmasq.settings;
domain = rule: builtins.elemAt (lib.splitString "/" rule) 1;
answered = map domain s.address;
in
lib.elem "hive-collector.hive" answered
&& map domain (s.local or [ ]) == answered
&& lib.all (rule: lib.hasSuffix "/" rule) (s.local or [ ]);
}
{
# The absence arm, and what makes the agents' queue address cases above able
# to fail.