Sperre pro Config und atomare checkzfs-Ausgabe #17
Loading…
Reference in a new issue
No description provided.
Delete branch "thorsten.spille/fix-2-lock-per-config"
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?
Behebt #2: überlappende Läufe derselben Config (Cron + Handstart) haben gleichzeitig Snapshots erzeugt und repliziert und sich die Spooldatei in /tmp geteilt (
Failed to create snapshot,mv: cannot stat '/tmp/900_zsync_…').Änderungen
flock -n -oerneut; ein zweiter Lauf mit derselben Config wird mit[ERROR] Another run … is still active (pid …)und Exit-Code 1 übersprungen, bevor er etwas tut. Andere Configs laufen weiter parallel.-o, weil der ssh-Master (ControlPersist) sonst die Sperre nach dem Lauf weiter hält (Gegenprobe gemacht). Ohneflockaus util-linux läuft alles wie bisher, mit[WARN].mktemp), als Punktdatei neben den Spool kopiert und umbenannt – lokal und auf der Quelle. Kein Rest mehr in /tmp, Rechte 644 wie bisher.snapshot_filtersteht.>>), sonst leert ein übersprungener Lauf das Log des aktiven Laufs./var/log/bashclub-zsync(paketiertes logrotate) bleiben unverändert.Replikations- und Löschalgorithmus unverändert.
Tests
main, außer dem gewollten atomarenscp/mvin Szenario 39-locked(Sperre gehalten → Lauf ohne einen einzigen zfs/ssh-Aufruf übersprungen) und10-label-in-filter(jedes Intervall nur einmal geprüft; das einedestroyweniger im Vergleich kommt nur vom Stub, der nicht wirklich löscht)-hohne Sperre; ohne flock nur WarnungCloses #2
🤖 Generated with Claude Code
A second run with the same configuration (e.g. cron and a manual start) created snapshots and replicated at the same time as the active run, and both used the same spool file in /tmp ("mv: cannot stat"). - the script runs again under flock (util-linux, -o so the background ssh master does not keep the lock); a second run is skipped with an error and exit code 1, without flock everything runs as before with a warning - checkzfs writes to a temporary file of the run, which is copied next to the spool file as dot file and renamed, locally and on the source - the snapshot label is not added to snapshot_filter a second time Tests: scenarios for a held lock and for the label in the filter, hooks in run.sh, scp stub copies, leftover files are listed. Refs #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Manuell nach
maingemergt (522ae54), CI inkl. publish nach testing grün. Schließe den PR.Pull request closed