Repository navigation
tests: fix #3972, #3980 — verify the borrowed rig reload and the clearnet fixture apply - #3990
Closed
pithead-developer[bot] wants to merge 7 commits into
Closed
pithead-developer[bot] wants to merge 7 commits into
pithead-developer[bot] wants to merge 7 commits into
Conversation
…nostics Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…gnostic Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-own-roo Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d selftest Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e2e-borrow-never-moves-a-bench-s-own-roo
4 of 8 tasks
Contributor
Author
|
Replaced by #4621: the same five commits rebuilt on current |
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.
What's the problem
Part of #3972
Part of #3980
miner_reloadreturned success although the job's user may onlysudo systemctl stop/startand cannot signal the root process, andwait_workerscounted any worker on the proxy, so worker-dependent e2e rows could pass without the borrowed rig (e2e borrow never moves a bench's own root-run miner, and the worker gate still passes #3972).reserved_node_clearnet_fixturediscarded itspithead applyoutput, applied right after a control restart, and never retried, so one transient conflict failed a ~60-minuteprovisionproof with no cause in the log (tier4-kvm: reserved-node clearnet fixture's host-side apply fails intermittently right after a control commit #3980).How I fixed it
miner_reload(now intests/integration/lib/borrow-fixture.sh, withwait_workers) triesrestart, thensudo stop+start, then the user unit, and returns success only when that unit's MainPID changed. There is no signal fallback: a signal proves no reload, so a rig with no restartable unit fails loudly. After astop, a failedstartis retried once; if it still fails the reload fails (the rig stays stopped and the restore path reports it).rig-idpithead-e2e, andwait_workerstakes that name: it passes only when an online worker with that name is on the proxy, not on a bare count.tests/os/appliance-clearnet-fixture.sh(the node-runtime leg was at its file-budget ceiling). It waits for an idle control runner and a free mutation lock, runs the apply throughapproval_restore_step(exit status + redacted tail), retries once, and puts every attempt's diagnostic (exit status and redacted tail) in the failure row; a probe failure reads "busy or unreachable". Shortcut: "control runner answering" is checked as the path unit active and the service not activating, plus a free mutation lock; upgrade when the runner exposes a readiness probe.docs/dev/integration-testing.mdanddocs/dev/testing-strategy.md; budget ceilings lowered for the two files that shrank.Here is the proof
selftest-borrow-reload.sh12 passed (new file, split out to keepselftest-borrow-rearm.shunder 400 lines; it still passes, 46) (restart refused → stop/start accepted; same MainPID rejected; all paths failing is loud; no signal fallback; other/offline worker does not satisfy the gate; pre-existing bench pool gets the rig-id);appliance-node-runtime-leg.sh --self-testpassed (busy-then-idle, never-idle, one retry then pass, two failures keep exit + the real filter's redacted tail, and an idle-wait failure on the retry keeps the first apply's diagnostic). The apply-output filter also keeps the lock-timeout phrase now.wait_workerswithout the rig name, so that path still counted any worker. Fixed, with a behavioural test that driveshandle_borrow_rearmand fails without the fix (every re-arm attempt waits for the borrowed rig by name). Added usage comments I had introduced were removed. Known limits kept: the borrow-time gate ine2e.shstays a warning as before, and the matrix's own worker predicates still count proxy workers; a stop whose start fails twice leaves the rig stopped and fails the reload, and the exit restore retries it.develop-v2.1.0again):make lint-file-budgetpasses withFILE_BUDGET_BASE_REF=origin/develop-v2.1.0(the script defaults toorigin/develop, which makes it flag three unrelated files on a PR that targets this line);make lint-pithead-buildpassed on the previous merged head; shfmt and shellcheck clean on the changed shell files;selftest-borrow-reload.sh12 passed,selftest-borrow-rearm.sh46 passed,appliance-node-runtime-leg.sh --self-testpassed. GitHub: 52 checks pass, 2 skipped, none failing.tier4-e2etargeted completed (block below, unedited frombench-ci evidence);tier4-kvmprovisionjob 3939 ended inerrorat the queue (environment: required shared node inputs/reservation unavailable after 17629s (sync_wait_seconds=14400); no image build started; every step skipped, no row ran), so it was resubmitted as a new attempt, job 3977, which completed (block below, unedited frombench-ci evidence).bench-ci job 697@c86210f88515f251689a89387ee48d2ec1a55365 · pithead · tier4-kvm
options: {"phases": ["provision"]}
status: completed · conclusion: failure · exit 1 · 52m 56s
baseline verified: yes · rig restored: n/a
node guard: not recorded · no comparison recorded
steps: checkout success · reserve success · preflight success · run failure · collect success · restore success · cleanup success
rows: 337 pass · 5 fail · 1 skip (missing 1)
image sha256: system.img 791af4e2aae7c77ed657d8c25efb2a1819037966a8bbbe20d8bae3cc04a460fc
failed rows:
Generated by
bench-ci evidence 697@c86210f88515f251689a89387ee48d2ec1a55365; re-run it to check.In that job's raw log the reserved-node preview, rendered-endpoint and audited-rejection rows passed and the XvB routing leg ran, so the clearnet fixture's apply succeeded; its retry path did not trigger and is proven only by its selftest. The five red rows are all owned: the three
local-miner apply togglerows (apply exits on 'No configuration changes detected' before printing the pool URL and stratum password, and before converging the local miner #3090) by tier4-kvm provision fails the local-miner apply-toggle rows (#3090) on unchanged develop-v2.1.0 #4113 and the twoold_imagerows by tier4-kvm provision fails hostname-preview and old_image rows on unchanged develop-v2.1.0 #3935.bench-ci job 907@c86210f88515f251689a89387ee48d2ec1a55365 · pithead · tier4-e2e
options: {"mode": "targeted"}
status: completed · conclusion: failure · exit 1 · 30m 34s
baseline verified: yes · rig restored: yes
node guard: not recorded · no comparison recorded
steps: checkout success · reserve success · preflight success · run failure · collect success · restore success · cleanup success
rows: 156 pass · 1 fail · 3 skip (by-design 1, missing 2)
failed rows:
Generated by
bench-ci evidence 907@c86210f88515f251689a89387ee48d2ec1a55365; re-run it to check.In that job's raw log the borrow reads
miner primary pool is now: <bench>:3333then1 worker(s) mining through the test bench (pithead-e2e), and the one red row is the rigforge-control setup: dashboard never re-reads the supplied rig within 120s after control setup (job 1698) #2890 row (worker '<rig>' never appeared), the same single failure as the four earlier e2e jobs. The fleet's downtime list has no interval on the bench that ran it during its window, so it is not an outage effect and was not resubmitted.Bench evidence at the previous head 38ae5b6 (the base was merged and the re-arm gate fixed since), blocks pasted unedited from
bench-ci evidence:bench-ci job 599@38ae5b6ad808aba7419d51409aa3a9f659df0e0e · pithead · tier4-e2e
Generated by
bench-ci evidence 599@38ae5b6ad808aba7419d51409aa3a9f659df0e0e; re-run it to check.bench-ci job 521@38ae5b6ad808aba7419d51409aa3a9f659df0e0e · pithead · tier4-kvm
options: {"phases": ["provision"]}
status: completed · conclusion: failure · exit 1 · 48m 38s
baseline verified: yes · rig restored: n/a
node guard: not recorded · no comparison recorded
steps: checkout success · reserve success · preflight success · run failure · collect success · restore success · cleanup success
rows: 332 pass · 5 fail · 1 skip (missing 1)
image sha256: system.img f62851ad1542889ee2b1679adaeee9b9938c4bbf417a7a99729209467549bcfa
failed rows:
Generated by
bench-ci evidence 521@38ae5b6ad808aba7419d51409aa3a9f659df0e0e; re-run it to check.What those jobs showed, from the raw logs: in 599 the borrow log reads
miner primary pool is now: <bench>:3333then1 worker(s) mining through the test bench (pithead-e2e), so the named-rig gate saw the borrowed rig by itsrig-id. In 521 the reserved-node rows passed (preview, rendered endpoints, audited rejection) and the XvB routing leg ran, so the clearnet fixture's apply succeeded; the retry path did not trigger and is proven only by its selftest.Other red rows, each with an owner:
supplied rig exposes its enriched feed after control setupis rigforge-control setup: dashboard never re-reads the supplied rig within 120s after control setup (job 1698) #2890 (same row,worker '<rig>' never appeared); the twoold_imagerows are tier4-kvm provision fails hostname-preview and old_image rows on unchanged develop-v2.1.0 #3935; the threelocal-miner apply togglerows (apply exits on 'No configuration changes detected' before printing the pool URL and stratum password, and before converging the local miner #3090) are tier4-kvm provision fails the local-miner apply-toggle rows (#3090) on unchanged develop-v2.1.0 #4113 (the same rows on unchangeddevelop-v2.1.0). None is in code this PR touches.Not proven live: re-arm after a password-rotating step on a self-borrowing bench (that row sits behind the red rigforge-control setup: dashboard never re-reads the supplied rig within 120s after control setup (job 1698) #2890 row), the reconnect row on a remote-rig bench, and repeated
provisionruns at one head. Thetests/os/selftest-go-source-fetch.shflake seen once on an earlier head is recorded on Flaky: test_attempt_deadline_is_enforced counts 2 timeouts instead of 3 on a loaded runner #3932.