re-sweep a replaced media volume despite the ownership sentinel

The boot sweep skipped whenever the sentinel in /config matched, so wiping or swapping /media/frigate while keeping the config volume left the new root-owned folder unswept and Frigate failed to create /media/frigate/recordings. The sentinel is now honored only when each volume root is still owned by the runtime user. Filesystems that accept chown without applying it (CIFS without setuids) get an unmanaged sentinel after a clean sweep so they don't re-sweep on every boot.
This commit is contained in:
Josh Hawkins
2026-11-27 07:09:53 -06:00
parent 8c773c2e2e
commit 19a212dfb1
3 changed files with 38 additions and 11 deletions
+12
View File
@@ -314,6 +314,18 @@ jobs:
sleep 2
done
if [ "$ok" -ne 1 ]; then echo "sentinel skip never logged"; docker logs frigate-puid; exit 1; fi
# a replaced media volume re-sweeps despite the sentinel
docker stop frigate-puid
sudo rm -rf /tmp/frigate-media-puid
sudo mkdir /tmp/frigate-media-puid
docker start frigate-puid
up=0
for i in $(seq 1 60); do
docker exec frigate-puid curl -fs http://127.0.0.1:5000/api/version && up=1 && break
sleep 5
done
if [ "$up" -ne 1 ]; then echo "replaced media volume was not swept"; docker logs frigate-puid; exit 1; fi
docker exec frigate-puid stat -c %u:%g /media/frigate | grep -qx 1500:1500
docker rm -f frigate-puid
- name: Assert read-only rootfs with --user works
run: |