Skip to content

fix(xtask): stop orphaned nss units on service stop - #48

Merged
thomas-fractalbits merged 1 commit into
mainfrom
fix/stale-nss-teardown
Sep 18, 2026
Merged

thomas-fractalbits merged 1 commit into
mainfrom
fix/stale-nss-teardown

Conversation

@thomas-fractalbits

@thomas-fractalbits thomas-fractalbits commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • stop_service now stops any lingering nss@N unit after the role agents are stopped. The agent normally stops its NSS on shutdown, but when it is killed or hits its 5s stop timeout the unit survives the stage teardown, the next init_service formats around it, and the fresh agent adopts it since the health check only compares the journal uuid.
  • Raises the CI debug artifact's journal capture from 5000 to 50000 lines so the teardown window before a failure is visible.

Root cause of the x86_64 CI failure (run 35305969572)

The s3 api tests (Etcd backend) stage runs with one BSS node; its NSS loaded a single-node metadata volume group. That NSS outlived the stage teardown and was adopted by the bss-node-failure stage's role agent. When the test stopped bss-0, the stale NSS's state-log persist failed with write quorum failed: ok_ops=0, W=1, N=1 and panicked; the agent SIGKILLed and restarted it, and the degraded puts failed during the ~15s restart window. It is timing dependent, which is why arm64 and the previous x86_64 run passed.

Reproduced locally by SIGKILLing the role agents and running service stop: nss@0 stayed active before the change and is stopped after it.

stop_service left nss@N to its role agent. When the agent is killed or
its 5s stop timeout hits, the unit outlives the stage teardown, the
next init formats around it, and the fresh agent adopts it because the
health check only compares the journal uuid. The stale NSS still holds
the previous layout's single-node metadata volume, so stopping that
BSS node panics it mid-test (state log write quorum W=1 N=1), which is
what failed bss-node-failure on the x86_64 CI runner. Once no agent
runs, any nss@N is an orphan, so stop it too.

The CI debug artifact now keeps 50k journal lines so the teardown
window before a failure is captured.
@thomas-fractalbits
thomas-fractalbits merged commit eaa6a33 into main Sep 18, 2026
5 checks passed
@thomas-fractalbits
thomas-fractalbits deleted the fix/stale-nss-teardown branch October 10, 2026 13:51
thomas-fractalbits added a commit that referenced this pull request Oct 10, 2026
fix(xtask): stop orphaned nss units on service stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant