refuse an agentNatsUrl that hive-priv would reject at container start
on deploy, deploy.hive-controller.queue.agentNatsUrl must be one scheme://host:port; an IPv6 literal or a comma list now fails at evaluation instead of failing every container start.
This commit is contained in:
parent
bbc6174361
commit
6dd9d0086e
3 changed files with 27 additions and 2 deletions
|
|
@ -308,6 +308,25 @@ let
|
|||
name = "a hive with no agent queue address forwards none";
|
||||
ok = !(noAgentQueue.systemd.services.hive-c0re.environment ? HIVE_AGENT_NATS_URL);
|
||||
}
|
||||
{
|
||||
# hive-priv refuses a value outside the facts' character set at container
|
||||
# start, so the option refuses an IPv6 literal or a list at evaluation.
|
||||
# Only the option's own value is forced, not the rest of either host. The
|
||||
# default (`allLocal`) is the control that the lookup accepts an address.
|
||||
name = "the agents' queue address option takes one scheme://host:port and nothing else";
|
||||
ok =
|
||||
let
|
||||
accepts =
|
||||
host: (builtins.tryEval host.services.hyperhive.deploy.hive-controller.queue.agentNatsUrl).success;
|
||||
in
|
||||
accepts allLocal
|
||||
&& !(accepts (hiveWithController {
|
||||
deploy.hive-controller.queue.agentNatsUrl = "tls://[fd00::1]:4222";
|
||||
}))
|
||||
&& !(accepts (hiveWithController {
|
||||
deploy.hive-controller.queue.agentNatsUrl = "tls://a.t.local:4222,tls://b.t.local:4222";
|
||||
}));
|
||||
}
|
||||
{
|
||||
# Control: `bare` sets none of them, and its serve.json carries the
|
||||
# dashboard port, so the key lookup reads a real document.
|
||||
|
|
|
|||
Loading…
Reference in a new issue