fix(connect): recover docker-driver inference route without the cluster DNS repair (#3403) - #4551
Merged
cv merged 2 commits intoMay 29, 2026
Conversation
…er DNS repair (NVIDIA#3403) shouldUseLegacyDnsProxyRepair returned true for every driver except vm, so a docker-driver sandbox ran the legacy repair that patches CoreDNS inside an openshell-cluster-<name> container. The docker driver runs the gateway as nemoclaw-openshell-gateway with host networking and has no such container, so runSetupDnsProxy aborted with "Could not find gateway container for <name>. DNS proxy not installed." and inference.local stayed unreachable; nemoclaw <name> connect then left openclaw tui failing with "LLM request failed: network connection error". Exclude docker from the legacy predicate so the docker driver takes the non-legacy path and recovers the route via openshell inference set, matching usesGatewayMetadataProbe (snapshot.ts) and the !== docker guard already on the snapshot DNS-proxy step. Repoint the two existing connect-inference tests that exercised the cluster CoreDNS repair to the kubernetes driver (where the cluster container exists) and add a docker-driver regression test. Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Contributor
📝 WalkthroughWalkthroughThis PR refines DNS proxy repair logic by excluding docker sandboxes from the legacy CoreDNS-in-container repair path, restricting it to kubernetes and other drivers. The implementation change is accompanied by updated and new tests that verify driver-specific repair behavior. ChangesDNS Proxy Repair Driver Behavior
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cv
approved these changes
May 29, 2026
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.
Summary
The docker-driver gateway now recovers a broken inference.local route through
openshell inference seton connect, instead of running the k3s-only CoreDNS cluster repair that can never find its container under the docker driver. Reported on a Docker-driver host in #3403.Related Issue
Closes #3403
Problem
shouldUseLegacyDnsProxyRepairinsrc/lib/actions/sandbox/connect.tsreturned true for every driver except"vm", so a"docker"sandbox took the legacy repair path. That path (runSetupDnsProxy) patches CoreDNS inside anopenshell-cluster-<name>container, which only the k3s/kubernetes gateway runs. The docker driver runs the gateway asnemoclaw-openshell-gatewaywith host networking and has no such container, sorunSetupDnsProxyaborted withWARNING: Could not find gateway container for '<name>'. DNS proxy not installed.and inference.local stayed unreachable. Afternemoclaw <name> connect,openclaw tuithen failed withLLM request failed: network connection error. The contract elsewhere already excludes docker from this step:usesGatewayMetadataProbe(snapshot.ts) treats"docker"and"vm"as cluster-less drivers, and the snapshot DNS-proxy step is guarded byopenshellDriver !== "docker".Changes
"docker"fromshouldUseLegacyDnsProxyRepairso the docker driver takes the non-legacy branch, which recovers the route viaopenshell inference set(the samereapplyVmInferenceRoutestep the vm driver uses) and reports an accurateinference.local is unavailable ... Reapplying OpenShell inference routemessage instead of the misleading cluster-container warning.openshell-cluster-<name>container exists.test/sandbox-connect-inference.test.ts: a broken inference.local probe now triggers theinference setreapply (not the legacy cluster repair), asserts noget service kube-dnscall, and checks for theReapplying OpenShell inference route/inference.local route repairedoutput.openshellDriver: "docker"to"kubernetes", since theopenshell-cluster-<name>container only exists for the k3s driver.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Ran: full
test/sandbox-connect-inference.test.tssuite passes (18/18);npm run typecheck:cliandnpm run build:cliclean.Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com
Summary by CodeRabbit
Bug Fixes
Tests