Repository navigation
feat(cluster): start the node Colima profile from a launchd daemon at boot - #175
Merged
Merged
Conversation
…at boot The login agent only runs once someone logs in, so a Mac that reboots or loses power sits at the login window with the node's Colima profile stopped, and its k3s container never comes back. The profile named by github_runner_cluster_runtime_boot_profile (node) is now started by a launchd daemon, a property list in /Library/LaunchDaemons owned by root:wheel with mode 0644, loaded into the system domain and running as the connecting user (UserName) with HOME, PATH and COLIMA_HOME in its environment. Writing and loading it use become. Any other profile keeps its login agent, rendered and installed exactly as before. github_runner_cluster_runtime_autostart_at (auto, login or boot) overrides the choice per host. A profile has one kind of job at a time. Installing the daemon unloads and deletes the profile's agent from an earlier run, whether or not the user has a login session, and installing the agent does the same to a daemon, so the profile is not started twice. Neither unload stops the VM.
…ive node's argument specs The argument specs declare the native node's variables only, and a test holds them to it.
Mearman
marked this pull request as ready for review
November 3, 2026 00:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
|
🎉 This PR is included in version 2.21.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
The Colima
nodeprofile was started by a launchd user agent, which only runs once someone logs in. A Mac that reboots or loses power with FileVault off sits at the login window, so the profile and the k3s container stay down (m1 did exactly that).For the profile named by
github_runner_cluster_runtime_boot_profile(defaultnode) the role now installs a launchd daemon instead:/Library/LaunchDaemons/<label>.plist,root:wheel,0644, loaded withlaunchctl bootstrap system. It runscolima start --profile node --activate=falseas the connecting user (UserName) withHOME,PATHandCOLIMA_HOMEin its environment, and logs to the user's~/Library/Logs. Writing and loading it usebecome. Any other profile (the mini'sdefault) keeps its login agent; its rendered plist is byte for byte what it was.github_runner_cluster_runtime_autostart_at(auto,login,boot) overrides per host.A profile has one kind of job at a time. Installing the daemon unloads the profile's agent from
gui/<uid>when there is a session and deletes its plist either way (m1 has the file but no session), so hosts that got the v2.19.0 agent migrate on the next run and nothing starts the profile twice. Setting a host back tologinretires the daemon the same way. Neither unload stops the VM, and loading runscolima start, which does nothing to a running profile. A rerun with nothing changed changes nothing.Tests (
tests/unit/test_runtime_autostart.py) run the role against stand-ins, with alaunchctlthat refuses to change the system domain unless called through the stand-insudo. I checked they fail withUserNameremoved from the template and withbecomeremoved from the load task.Only a real boot shows whether a daemon with
UserNamecan start a vz VM and whethersocket_vmnet's sudoers entry works from it; the stand-ins cannot. Validation on m1: stop the profile and unload the agent, load the daemon, reboot to the login window and checkcolima status --profile node.