add-to-group: --quarantine-on-register, because the bootstrap doesn't wait - #66
Merged
Conversation
… wait `provision --quarantine-on-register` cannot hold back a fresh host, and wave 1 proved it. Adding a host to the bootstrap group triggers a fully autonomous bootstrap -- pkg, puppet, autologin, Safari, sentinel, worker -- and all four hosts finished, registered and began claiming autoland tasks before anyone ran provision. The flag can only quarantine a registration it is watching for; it can't retroactively hold a worker that is already taking work. macmini-m4-242 failed 15 production tasks in that window (mochitest, jsreftest, web-platform-tests) with no live_backing.log on any of them: claim, reboot ~90s later, fail, repeat. So the watch has to start where the bootstrap is triggered: reprovision add-to-group <host> --quarantine-on-register reprovision batch <file> --action add-to-group --quarantine-on-register Details that matter: - The watch budget must span the ENTIRE bootstrap, not the registration gap. step_quarantine_on_register's default is 900s, sized for the provision path where the worker is a minute away. From here it also covers pkg install, puppet, several reboots and the sentinel -- ~30 min measured on wave 1 -- so this caller passes bootstrap_max_wait + quarantine_on_register_max_wait. A default-sized budget would expire before there was anything to quarantine, and the host would go live unheld: the exact failure the flag exists to prevent. - The batch per-host timeout scales with it (5:00 -> 80:00). A child killed mid-watch leaves the host live and unheld, so the timeout has to cover it. - The watch also runs on the already-a-member path. That path returns early, but an already-member host can still be mid-bootstrap and about to register. - Without the flag the banner now says so plainly rather than staying silent about it. Also: membership does not prove the pkg was ever pushed -- the already-member path skips push_apps, so a host added by hand in the UI can sit in the group with nothing installed. It now warns when the payload is missing. It deliberately does not push: push_apps hits every member of the group and would re-run the postinstall on hosts that are mid-bootstrap. Ref: RELOPS-2515 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
provision --quarantine-on-registercannot hold back a fresh host, and wave 1 proved it.Adding a host to the bootstrap group triggers a fully autonomous bootstrap — pkg, puppet, autologin, Safari, sentinel, worker. All four wave-1 hosts finished, registered, and began claiming autoland tasks before anyone ran provision. The flag can only quarantine a registration it is actively watching for; it cannot retroactively hold a worker that is already taking work.
macmini-m4-242failed 15 production tasks in that window — mochitest, jsreftest, web-platform-tests — with nolive_backing.logon any of them. The cycle was: claim → reboot ~90s later → fail with no output → repeat.So the watch has to start where the bootstrap is triggered:
Details that matter
The watch budget must span the entire bootstrap.
step_quarantine_on_register's default is 900s, sized for theprovisionpath where the worker is ~a minute away. Started from here it also covers pkg install, puppet, several reboots and the sentinel — ~30 min measured on wave 1. A default-sized budget would expire before there was anything to quarantine, and the host would go live unheld: precisely the failure the flag exists to prevent. This caller passesbootstrap_max_wait + quarantine_on_register_max_wait.The batch per-host timeout scales with it, 5:00 → 80:00. A child killed mid-watch leaves the host live and unheld.
The watch also runs on the already-a-member path. That path returns early, but an already-member host can still be mid-bootstrap and about to register.
Without the flag, the banner now says so rather than staying silent.
Bonus fix
Membership does not prove the pkg was ever pushed — the already-member path skips
push_apps, so a host added by hand in the UI can sit in the group with nothing installed (m4-241 was in exactly that state). It now warns when the payload is missing.It deliberately does not push:
push_appshits every member of the group and would re-run the postinstall on hosts that are mid-bootstrap.Testing
216 pass,
ruff check .clean on the pinned 0.15.19. 6 new tests, including one asserting the budget exceeds the default (the bug that would silently reintroduce the whole failure) and one asserting the batch forwards the flag.Ref: RELOPS-2515
🤖 Generated with Claude Code