Repository navigation
feat(worker): let the owner choose runc or gVisor per earner, and report what each host can give - #892
Merged
Conversation
…ort what each host can give The runtime choice was env-only, so an owner could not pick gVisor for one earner from the UI, and the UI could not show which earners really got it. - The heartbeat reports system_info.layers: the runtimes Docker registered and which are gVisor (judged by the binary, not the name), KVM from sysfs, and what CASHPILOT_CONTAINER_RUNTIME and its overrides pin. Unread values are null, so an older or blind worker reads as unknown, not absent. - Each container entry carries its runtime and network. - A deploy takes runtime_choice, runc or gvisor. gVisor becomes the --network=host variant Docker's DNS needs on our bridge, plus --net-raw for an earner whose catalog declares NET_RAW (Bitping). - A choice that the catalog (Mysterium needs runc) or an env pin overrules is refused with the reason before the running container is touched. The env still wins over the UI; nothing is swapped silently. - No choice means Docker's default, as before.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 27, 2026
Closed
Closed
…ntime choice that a named runtime or a routed copy cannot honour
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #892 +/- ##
==========================================
+ Coverage 94.56% 94.58% +0.01%
==========================================
Files 94 95 +1
Lines 28125 28291 +166
==========================================
+ Hits 26597 26758 +161
- Misses 1528 1533 +5
🚀 New features to boost your workflow:
|
This was referenced Nov 28, 2026
Closed
Closed
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.
Today an owner who wants an earner under gVisor has to set environment variables on the worker. The UI cannot see which runtimes a host has, and it cannot see which runtime each earner got. The UI needs both before it can offer the choice.
This PR adds the worker side:
system_info.layers. It holds the runtimes that Docker registered, which of them are gVisor (judged by the binary), whether the host has/dev/kvm, the runtime that an env variable pins, and the runtimes that the socket proxy allows. A value the worker cannot read isnull, so an older or blind worker reads as unknown, never as absent.runtimeandnetwork.runtime_choice(runcorgvisor), and the worker turns it into a registered runtime. gVisor needs a runtime registered with--network=host. An earner that declaresNET_RAWalso needs--net-raw. A choice that the worker cannot honour is refused with the reason, and it is never swapped for another runtime.runtime, then the env pin (bridge networking only), then the owner's choice. So the env variables still win over the UI.Nothing selects gVisor by itself. With no choice, an earner keeps Docker's default, as before.
Stack: 1 of 4. #893, #894 and #895 build on it.
Desktop: needs nothing. Desktop has no Docker runtimes. Its deploy form and validation do not change here, because the field is optional and the UI never sends it to Desktop.
Tests:
tests/test_layers.pyhas 32 tests. Two mutations turned them red: removing the env pin check gave 5 failures, and so did removing thenet_rawfilter. Real hosts: through the worker API, on a throwaway Ubuntu 24.04 box, Honeygain withgvisorgotrunsc-hostnetoncashpilot-isolated. Bitping gotrunsc-hostnet-raw. A redeploy withruncgotrunc.