Skip to content

ci: run bare metal maintenance on the right nodes - #2597

Merged
sespiros merged 3 commits into
mainfrom
sse/bm-maintenance-runner-host
Sep 1, 2026
Merged

ci: run bare metal maintenance on the right nodes#2597
sespiros merged 3 commits into
mainfrom
sse/bm-maintenance-runner-host

Conversation

@sespiros

@sespiros sespiros commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Two nodes have carried ci.contrast.edgeless.systems/main-runner=true since a second bare-metal machine joined the TDX-GPU cluster on 2026-08-14, so the maintenance jobs pick one at random.

nix-gc collects the runner's nix store and dies on the other machine (timed out 08-18 and twice on 08-20, blocking v1.23.1, hence b0753f7).
It now resolves the runner's own node by matching /etc/machine-id against the node's machineID, so no labeling is needed.
cleanup and cleanup-containerd pass but only clean the node they land on, so they now run once per main-runner node, and a failure on one no longer skips the rest.

Revert b0753f7 once the bare metal maintenance run this merge triggers is green on TDX-GPU.
Why nix-gc dies on that node is still unknown, but the last commit dumps job and pod state on failure, so the next occurrence will say.

@sespiros
sespiros requested a review from charludo August 20, 2026 18:33
@sespiros sespiros added no changelog PRs not listed in the release notes do not merge This shouldn't be merged at this point labels Aug 20, 2026
@sespiros
sespiros force-pushed the sse/bm-maintenance-runner-host branch 3 times, most recently from 7108310 to 9daf20c Compare August 21, 2026 08:46
@sespiros sespiros removed the do not merge This shouldn't be merged at this point label Aug 21, 2026
@sespiros
sespiros marked this pull request as ready for review August 21, 2026 09:32
@sespiros sespiros added the do not merge This shouldn't be merged at this point label Aug 21, 2026

@charludo charludo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! In general, LGTM. I'm not overly familiar with the available labeling strategies (both technically and best-practice) though, maybe Markus should also take a look at this?

Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
Comment thread dev-docs/e2e/bare-metal-runner.md Outdated
@sespiros
sespiros requested a review from burgerdev August 24, 2026 12:03
@sespiros
sespiros force-pushed the sse/bm-maintenance-runner-host branch from 9daf20c to d495645 Compare August 24, 2026 16:52
@sespiros
sespiros requested a review from charludo August 24, 2026 16:52
@sespiros sespiros removed the do not merge This shouldn't be merged at this point label Aug 24, 2026
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

CON-312

@charludo charludo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM, to more small things re: errors.

Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
@sespiros
sespiros force-pushed the sse/bm-maintenance-runner-host branch from d495645 to 0a08926 Compare August 25, 2026 08:18

@burgerdev burgerdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the jobs to target specific nodes makes perfect sense - there's just not a good way to run jobs but schedule like a daemonset that I know of.

However, I want to stress that having more than one main-runner was not how this was designed - the name itself is a giveaway.

  • There should not be two action runners in one cluster, because it violates assumptions about concurrent execution. (containerd restarts will mess with concurrent tests)
  • There should not be two nodes labeled main-runner, because our CSI driver does not support that.
  • There's also the implicit assumption that the Github action runs on the node that's labeled main-runner.

Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
Comment thread .github/workflows/bm_maintenance_platform.yml Outdated
@sespiros
sespiros force-pushed the sse/bm-maintenance-runner-host branch from 0a08926 to 824a2b1 Compare August 27, 2026 08:48
@sespiros

Copy link
Copy Markdown
Collaborator Author

@burgerdev thanks, I implemented the fixes.

* There should not be two action runners in one cluster, because it violates assumptions about concurrent execution. (containerd restarts will mess with concurrent tests)

* There should not be two nodes labeled `main-runner`, because our CSI driver does not support that.

* There's also the implicit assumption that the Github action runs on the node that's labeled `main-runner`.

The second node didn't get the label by accident, iiuc this adds a main-runner=true nodeSelector to all Contrast pods:

MainRunnerNodeLabel: "true",
and then also 7891c4a makes TestGPU deploy one workload per GPU model found in the cluster, so the B300 test can only be scheduled if that node carries the label.

The job garbage collects the nix store of the machine hosting the GitHub
runner, but selected main-runner=true, which two nodes have carried since a
second bare-metal machine joined the TDX-GPU cluster on 2026-08-14. That node
needs main-runner so B300 test pods can be scheduled on it (#2566), so match
the runner's own /etc/machine-id against the node's machineID instead, and
require exactly one match, since cloned Scaleway pool images share a machine
ID. It has timed out three times since, on 2026-08-18 and twice on 2026-08-20.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
cleanup and cleanup-containerd select main-runner=true, which two nodes have
carried since a second bare-metal machine joined the TDX-GPU cluster. They
still pass, but each run cleans one of the two and leaves the other's runtime
class directories, snapshotter state and images behind. Run the same job once
per schedulable matching node, and fail when none is labelled rather than
quietly cleaning nothing.

The job is deleted before each apply because spec.template is immutable, so
applying the next node's variant over one left by an interrupted run would
fail. The job timeout grows with it: the worst case is one 600s wait per node.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
kubectl wait only says "timed out waiting for the condition", and the next
step deletes the namespace, so a failure takes its own evidence with it.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
@sespiros
sespiros force-pushed the sse/bm-maintenance-runner-host branch from 824a2b1 to f061f3e Compare September 1, 2026 09:13
@sespiros
sespiros merged commit f5acb3c into main Sep 1, 2026
18 checks passed
@sespiros
sespiros deleted the sse/bm-maintenance-runner-host branch September 1, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants