Commit a5e7e63
## Summary
The docker-driver gateway now recovers a broken inference.local route
through `openshell inference set` on 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
`shouldUseLegacyDnsProxyRepair` in `src/lib/actions/sandbox/connect.ts`
returned true for every driver except `"vm"`, so a `"docker"` sandbox
took the legacy repair path. That path (`runSetupDnsProxy`) patches
CoreDNS inside an `openshell-cluster-<name>` container, which only the
k3s/kubernetes gateway runs. The docker driver runs the gateway as
`nemoclaw-openshell-gateway` with host networking and has no such
container, so `runSetupDnsProxy` aborted with `WARNING: Could not find
gateway container for '<name>'. DNS proxy not installed.` and
inference.local stayed unreachable. After `nemoclaw <name> connect`,
`openclaw tui` then failed with `LLM 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 by
`openshellDriver !== "docker"`.
## Changes
- Excluded `"docker"` from `shouldUseLegacyDnsProxyRepair` so the docker
driver takes the non-legacy branch, which recovers the route via
`openshell inference set` (the same `reapplyVmInferenceRoute` step the
vm driver uses) and reports an accurate `inference.local is unavailable
... Reapplying OpenShell inference route` message instead of the
misleading cluster-container warning.
- Left the kubernetes driver on the legacy CoreDNS repair path, where
the `openshell-cluster-<name>` container exists.
- Added a docker-driver case in
`test/sandbox-connect-inference.test.ts`: a broken inference.local probe
now triggers the `inference set` reapply (not the legacy cluster
repair), asserts no `get service kube-dns` call, and checks for the
`Reapplying OpenShell inference route` / `inference.local route
repaired` output.
- Repointed the two existing tests that exercise the CoreDNS cluster
repair and the managed-route reset from `openshellDriver: "docker"` to
`"kubernetes"`, since the `openshell-cluster-<name>` container only
exists for the k3s driver.
## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Verification
- [ ] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [x] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the style guide (doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
Ran: full `test/sandbox-connect-inference.test.ts` suite passes (18/18);
`npm run typecheck:cli` and `npm run build:cli` clean.
---
Signed-off-by: latenighthackathon
<latenighthackathon@users.noreply.github.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Refined DNS proxy repair logic to ensure docker sandboxes use the
correct route recovery mechanism instead of legacy cluster DNS repair.
* **Tests**
* Updated DNS proxy repair tests to reflect Kubernetes-specific
behavior.
* Added regression test for docker sandbox route recovery verification.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/4551?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Co-authored-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
1 parent 2d0a78b commit a5e7e63
2 files changed
Lines changed: 65 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
| 491 | + | |
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
534 | 587 | | |
535 | 588 | | |
536 | 589 | | |
| |||
933 | 986 | | |
934 | 987 | | |
935 | 988 | | |
936 | | - | |
| 989 | + | |
937 | 990 | | |
938 | 991 | | |
939 | 992 | | |
| |||
0 commit comments