Files
felhom.eu/documentation/audits/release-2026-11-03/part3/r1302_live.sh
T
admin a7e86fd273
gates / gates (push) Successful in 1m57s
Release 2026-11-03 close-out: every box on 0.350.0 with Traefik v3.7.17; golden 0.350.0 + agent 0.172.0 vouched; hub 0.179.0; catalog f4c5c79
Closed: R-1354, R-1347, R-1348, R-1339, R-1351, R-1323, R-1302, R-1352, R-1331, R-1356, R-1359 (235 -> 224). R-548 and R-1361 carry today's readings.
2026-11-03 10:26:23 +01:00

13 lines
1.5 KiB
Bash

#!/bin/bash
# R-1302 staged on the throwaway box (VM 9383, agent 0.172.0). The appliance path pre-positions the grant, so a plain first start never reaches the repair (read in the install log).
# A: a true first grant: no seen file, the grant taken away, the agent started. B: a loss: the seen file there, the grant taken away, the agent started.
del() { for k in "--users felhom-agent@pve" "--tokens felhom-agent@pve!agent"; do pveum acl delete /storage/felhom-pbs $k --roles FelhomAgentStore; done; }
show() { journalctl -u felhom-agent --since "$1" --no-pager | grep -E 'store-grant|capabilities self-check' | sed -E 's/^.*felhom-agent\[[0-9]+\]: //' | cut -c1-230; }
echo "version: $(/usr/local/bin/felhom-agent --version)"
echo "seen before: $(cat /var/lib/felhom-agent/store-grant-seen.json)"
echo "== A: first grant"; systemctl stop felhom-agent; rm -f /var/lib/felhom-agent/store-grant-seen.json; del; T=$(date '+%F %T'); systemctl start felhom-agent; sleep 25; show "$T"
echo "ERROR R-190 lines: $(journalctl -u felhom-agent --since "$T" --no-pager | grep -c 'R-190')"; echo "seen after: $(cat /var/lib/felhom-agent/store-grant-seen.json)"
echo "== B: a loss"; systemctl stop felhom-agent; del; T=$(date '+%F %T'); systemctl start felhom-agent; sleep 25; show "$T"
echo "INFO granted lines: $(journalctl -u felhom-agent --since "$T" --no-pager | grep -c 'store-grant: granted')"
pveum acl list --output-format json | python3 -c "import json,sys;print('grant back:',sum(1 for a in json.load(sys.stdin) if a['path']=='/storage/felhom-pbs'))"