Skip to content

Various follow-ups to milestone 4c#67

Open
jlebon wants to merge 7 commits into
mainfrom
daemon-stage-follow-ups
Open

Various follow-ups to milestone 4c#67
jlebon wants to merge 7 commits into
mainfrom
daemon-stage-follow-ups

Conversation

@jlebon

@jlebon jlebon commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

These are most of the things that came up as follow-ups as part of #50.

jlebon added 7 commits June 19, 2026 22:56
After the daemon issues a reboot, it now returns early from Reconcile()
on subsequent invocations. This prevents the daemon from running bootc
status on a node that is mid-shutdown, which could return garbage data.

This also makes the Rebooting state durable (it persists until the node
actually goes down), so the e2e test can now assert on it as an
intermediate lifecycle step.

This also matches what the MCO does.

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
The `reset()` method only needs to clear the backoff retry counter, so
it belongs on `stageOp` rather than `BootcNodeReconciler`. Clearing
`rebootIssued` is unnecessary in production; it doesn't make sense to
"un-issue" a reboot. The way it gets "reset" is by the daemon naturally
getting restarted as part of the reboot.

That said, add a `resetDaemon()` test helper to make resetting
everything easier.

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
After acquiring runMu, check ctx.Err() before calling Stage(). This
prevents stale goroutines from briefly starting a bootc switch process
with the wrong image after rapid spec changes (e.g. B→C→D). Multiple
goroutines may still pile up on the mutex, but each cancelled one exits
immediately without spawning a process.

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
exec.CommandContext already sends SIGKILL on context cancellation, and
bootc has no SIGINT handler, so graceful vs. hard termination is
equivalent. Replace the TODO with a brief note about the existing
behavior.

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
Run bootc switch as a transient systemd unit on the host rather than
directly inside the daemon pod's cgroup. It's just cleaner to structure
it this way (e.g. we don't have to account for bootc memory requirements
in our own, and also the operation transparently survives daemon pod
restarts), and will also allow in the future using various systemd
knobs, such as those around IO scheduling (see #61).

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
This reverts commit 7c5e31c.

The memory bump to 512Mi is no longer needed: bootc switch now runs
as a transient systemd unit on the host (outside the pod cgroup), so
its memory usage does not count against the daemon pod limit. 128Mi
is sufficient for the daemon itself (Go binary, controller-runtime,
API watches).

Assisted-by: Pi (Claude Opus 4.6)
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
@jlebon jlebon force-pushed the daemon-stage-follow-ups branch from 67475de to 53725cb Compare June 20, 2026 02:56
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