Check deployed extension intent through versioned daemon metadata
This commit is contained in:
parent
e0897bc11d
commit
b277d643d8
1 changed files with 21 additions and 5 deletions
|
|
@ -289,14 +289,29 @@ journalctl -u archipelagod.service -n 80 --no-pager
|
|||
command("archipelago self-check", True)
|
||||
command("archipelago status; pacman -Q nano; systemctl is-active systemd-networkd systemd-resolved sshd", True)
|
||||
if args.extensions_sequence:
|
||||
command("mc --version; htop --version; pacman -Q gpm slang pcre; "
|
||||
"! grep -qx gpm /usr/lib/archipelago/host-extensions")
|
||||
command("mc --version; htop --version; pacman -Q gpm slang pcre")
|
||||
if args.production_cli:
|
||||
requested_check = (
|
||||
"import json; d=json.load(open('/usr/lib/archipelago/extensions.json')); "
|
||||
"assert d['version']==3; "
|
||||
"assert sorted(d['requested'])==['htop','mc','nano'], d['requested']; "
|
||||
"assert sorted(r['name'] for r in d['requests'])==sorted(d['requested'])"
|
||||
)
|
||||
command("python3 -c " + shlex.quote(requested_check))
|
||||
else:
|
||||
command("! grep -qx gpm /usr/lib/archipelago/host-extensions")
|
||||
command("archipelago extension add tree; ! command -v tree", True)
|
||||
reboot()
|
||||
command("tree --version; mc --version; htop --version; nano --version; " + marker_check)
|
||||
command("archipelago self-check; archipelago status; "
|
||||
"test \"$(wc -l < /usr/lib/archipelago/host-extensions)\" = 4", True)
|
||||
command("archipelago self-check; archipelago status", True)
|
||||
if args.production_cli:
|
||||
requested_check = (
|
||||
"import json; d=json.load(open('/usr/lib/archipelago/extensions.json')); "
|
||||
"assert d['version']==3; "
|
||||
"assert sorted(d['requested'])==['htop','mc','nano','tree'], d['requested']; "
|
||||
"assert sorted(r['name'] for r in d['requests'])==sorted(d['requested'])"
|
||||
)
|
||||
command("python3 -c " + shlex.quote(requested_check))
|
||||
# The daemon owns durable history. An unknown catalog name is
|
||||
# rejected before staging (deployment invariance checked above),
|
||||
# so it must not require a legacy filesystem failure marker.
|
||||
|
|
@ -311,7 +326,8 @@ journalctl -u archipelagod.service -n 80 --no-pager
|
|||
)
|
||||
command("archipelago transaction list | python3 -c " + shlex.quote(history_check), True)
|
||||
else:
|
||||
command("test \"$(find /var/lib/archipelago/host-extensions/generations -name staged | wc -l)\" = 3; "
|
||||
command("test \"$(wc -l < /usr/lib/archipelago/host-extensions)\" = 4; "
|
||||
"test \"$(find /var/lib/archipelago/host-extensions/generations -name staged | wc -l)\" = 3; "
|
||||
"test \"$(find /var/lib/archipelago/host-extensions/generations -name failure | wc -l)\" = 1", True)
|
||||
if args.dkms:
|
||||
command("archipelago extension add v4l2loopback-dkms; "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue