validate: catch the host that passes every check and still eats every task - #67
Merged
Conversation
… task `--quarantine-on-register` holds a fresh host "pending validation" and nothing validated anything, so the only way a host proved itself unfit was by failing real work. macmini-m4-242 destroyed 15 production tasks (mochitest, jsreftest, web-platform-tests) at ~43s each before anyone looked. Its KVM presented 1280x1024@75Hz. mozharness fatally halts a pre-test refresh-rate check at anything but 60Hz, so every task died before running a single test. Every other signal on that host was perfect: puppet green, sentinel present, worker up, disk fine, semaphores byte-identical to a working host. reprovision validate <host> reprovision batch <file> --action validate Reading the display is the interesting part. Over a plain SSH login as admin, CoreGraphics has no window server and answers refresh=0.0, 0x0 -- not an error, just zeros, which a naive check sails straight past. So ssh.display_mode() hops into the console user's session with `launchctl asuser`, the same technique the Safari automation uses, and treats all-zeros as "unknown" rather than "fine". Verified on a known-good/known-bad pair: m4-242 75.00Hz 1280x1024 <- failed 15/15 tasks m4-243 60.00Hz 1920x1080 <- healthy This is why it is NOT part of preflight, which is where I first put it: preflight runs before the bootstrap, and cltbld does not exist until puppet creates it. A preflight version would silently pass exactly the fresh hosts it exists to catch. Gates on refresh rate only, at 60Hz, because that is the number mozharness itself enforces -- validate should agree with what CI will decide rather than invent a second standard. Resolution varies legitimately across the fleet, so it is reported, not gated. A down worker warns rather than fails: these hosts reboot between tasks, so it can just mean we caught one mid-cycle. Exit 2 (skipped) when the host hasn't bootstrapped; exit 1 when it has and is unfit. Read-only throughout -- safe on live workers. 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.
--quarantine-on-registerholds a fresh host "pending validation" — and nothing validated anything. So the only way a host proved itself unfit was by failing real work.macmini-m4-242destroyed 15 production tasks (mochitest, jsreftest, web-platform-tests) at ~43s each before anyone looked.Its KVM presented 1280x1024@75Hz, and mozharness fatally halts a pre-test refresh-rate check at anything but 60Hz — so every task died before running a single test. Every other signal on that host was perfect: puppet green, sentinel present, worker up, disk fine, semaphores byte-identical to a working host.
Reading the display is the interesting part
Over a plain SSH login as admin, CoreGraphics has no window server and answers
refresh=0.0, 0x0— not an error, just zeros, which a naive check sails straight past. Sossh.display_mode()hops into the console user's session withlaunchctl asuser(the same technique the Safari automation uses) and treats all-zeros as unknown, never as fine.Verified on a known-good/known-bad pair:
Why this is not part of preflight
That's where I first proposed putting it, and it was wrong.
preflightruns before the bootstrap, andcltblddoes not exist until puppet creates it. There's no session to query, so a preflight version would silently pass exactly the fresh hosts it exists to catch.Deliberate scoping
validateshould agree with what CI will decide, not invent a second standard.216 pass,
ruff check .clean on the pinned 0.15.19.Ref: RELOPS-2515
🤖 Generated with Claude Code