Repository navigation
fix(cluster): start a Colima profile in its own home at login - #173
Merged
Merged
Conversation
A filter that returns the COLIMA_HOME a profile needs from the endpoint of the Docker context Colima made for it, since Colima puts the profile's socket at <COLIMA_HOME>/<profile>/docker.sock. It is empty for Colima's own default home, and refuses an endpoint that is not that socket.
A profile that lives outside ~/.colima (the bridged node profile, with context colima-node and COLIMA_HOME ~/.colima-node) was started without COLIMA_HOME by both the role and its launchd agent, so Colima looked in ~/.colima and created a new VM there. After a reboot the node's container never came back. The role now takes the home from github_runner_cluster_colima_home when that is set, and otherwise from the endpoint of the profile's Docker context, read with docker context inspect (no running VM needed, so it works under --check). It passes the home to every colima call and writes it into the agent. A profile in ~/.colima gets the same agent and commands as before, with no COLIMA_HOME.
Mearman
marked this pull request as ready for review
November 2, 2026 22:40
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.19.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 autostart agent from #102 starts the Colima profile with the role's environment, which had no
COLIMA_HOME. On the Mac, the bridged node profile (contextcolima-node) lives in~/.colima-node, so after a reboot the agent rancolima start --profile nodeagainst~/.colima, which has no such profile, and the node'sgithub-runner-k3scontainer (restart: unless-stopped) never came back.The role now takes the home from
github_runner_cluster_colima_homewhen it is set, and otherwise from the endpoint of the profile's Docker context (docker context inspect, which reads the context file only, so it works with the VM stopped and under--check). Colima points that endpoint at<COLIMA_HOME>/<profile>/docker.sock; an endpoint that is not that socket fails the run asking for the variable. The home goes to every colima call the role makes and into the agent'sEnvironmentVariables. The parsing is a new filter,cluster_colima_home.A profile in
~/.colima(the mini'sdefaultone) gets noCOLIMA_HOME, so its agent,com.exadev.github-runner.colima.default, renders byte for byte as before and a converge changes nothing there. A second run on a node profile that is up with its agent loaded changes nothing either; the new tests cover both.Tested with
python -m unittestovertests/unit(stubbeddocker,colima,launchctl,plutil; breaking the home passed to colima fails the new test),ansible-lint --profile production,yamllint .and the playbook syntax checks. No playbook was run against a real host, so the agent loading at a real reboot is untested. An agent installed by the earlier role has noCOLIMA_HOME; the next converge rewrites it and reloads it.