fix(nas-storage-health): probe the directory the bot service's backup publishes to (#10) #23
No reviewers
Labels
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bryan/nix-configs!23
Loading…
Reference in a new issue
No description provided.
Delete branch "nas-probe-pi-bots-dir"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to N10.5 (#10, #14).
What
Studio's NAS write probe (
services.nas-storage-health.shares.Bryan.directory) now writes inBackups/pi-bots, taken fromservices.pi-bots-backup.destDir, instead ofBackups. The probe now checks the directory the bot service's nightly backup publishes to, which is whatNasWriteProbeFailedshould speak for. The two can't drift apart, because the probe reads the option. The probe's file (.nas-write-probe.<pid>) never matches the backup's stamp or.partial-<stamp>names, and the probe removes it before it exits.Tests
scripts/test_nas_storage_health.py: the agent's arguments nameBackups/pi-bots(main's host file fails that test), and a changeddestDirmoves the probe with it (a hardcoded path fails that one).test_pi_bots_backup.pypasses. The built probe script, run by hand with the agent's environment against the live share and the new directory:nas_write_probe_success1, and it left no file behind.darwin-rebuild build --flake .#studiobuilds.After
update-systemWithin 10 minutes
nas_write_probe_success{share="Bryan"}is 1 on the new directory.Review
A visible Pi reviewer found one should-fix (wording in this description) and three nits: the option link was untested; both modules' directory assertions accept a trailing slash (pre-existing, left); the host comment claimed slightly more than the code does. All fixed except the pre-existing one.