runner cleanup: detect a running build by its locks instead of pgrep -f #76
No reviewers
Labels
No labels
Bug
Feature
Idee
agent-freigabe
regression
status
ausarbeiten
status
bereit
status
in-arbeit
status
review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iac/iac-core!76
Loading…
Reference in a new issue
No description provided.
Delete branch "cleanup-locks"
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?
Refs iac-core#36 (the issue stays open until verified on the runner).
iac-runner-cleanupasks the locks of the image build and the boot test instead ofpgrep -f, so an ssh session withbootstrap-vzin its arguments no longer skips the cleanup. The lock files are opened read-only (no O_CREAT, protected_regular) and held until the cleanup ends, so no build starts in its middle.Differences to the issue: the image build releases its lock after bootstrap-vz (the compressing afterwards is covered by the existing half hour limit); a hard-killed build-image.sh leaves its children without a lock for a moment.
Tested: shellcheck,
tools/lint.sh, the script with stubbed findmnt/losetup/kpartx/docker and IAC_LOCK_DIR: runs without locks and with a process named bootstrap-vz, does nothing while the build lock or the boot-test lock is held.Not tested: on the runner during a real build and boot test. After merging it must be installed there (
install -m 0755 iac-runner-cleanup /usr/local/sbin/).🤖 Generated with Claude Code
https://claude.ai/code/session_014Px55FVUdXiuWr642SZTHK