remove the old snapshot store; tombstone its options
This commit is contained in:
parent
de3c5cbb65
commit
20d286f06a
1 changed files with 97 additions and 1308 deletions
|
|
@ -2049,6 +2049,43 @@ let
|
|||
})
|
||||
&& !(refused allLocal);
|
||||
}
|
||||
{
|
||||
# One host defining all five removed paths. Each message names its own
|
||||
# path (`services.hyperhive.swarm.snapshotStore.port` does not contain
|
||||
# `services.hyperhive.snapshotStore.port`), so each lookup finds only
|
||||
# its option. The control is a host that defines none.
|
||||
name = "a definition of a removed snapshot store option fails evaluation, naming the option and swarm-archive";
|
||||
ok =
|
||||
let
|
||||
paths = [
|
||||
"swarm.snapshotStore.address"
|
||||
"swarm.snapshotStore.port"
|
||||
"snapshotStore.enable"
|
||||
"snapshotStore.path"
|
||||
"snapshotStore.port"
|
||||
];
|
||||
refused =
|
||||
m: path:
|
||||
lib.any (
|
||||
a:
|
||||
!a.assertion
|
||||
&& lib.hasInfix "services.hyperhive.${path}" a.message
|
||||
&& lib.hasInfix "agent-state backups are being rebuilt as swarm-archive" a.message
|
||||
) m.assertions;
|
||||
old = hive {
|
||||
swarm.snapshotStore = {
|
||||
address = "10.100.0.1";
|
||||
port = 51821;
|
||||
};
|
||||
snapshotStore = {
|
||||
enable = true;
|
||||
path = "/var/lib/hyperhive-snapshots";
|
||||
port = 51821;
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.all (path: refused old path) paths && !(lib.any (path: refused bare path) paths);
|
||||
}
|
||||
{
|
||||
# Refused wherever any hyperhive service runs, the hive or a swarm
|
||||
# service alone. The host enabling nothing is the control that it is
|
||||
|
|
|
|||
Loading…
Reference in a new issue