fix(portal): tolerate pre-#988 guest missing Container.Start#1020
Conversation
A box created before #988 boots a guest agent that has no Container.Start RPC (the agent is baked into the reused guest rootfs). The post-#988 host calls Start on restart/exec; tonic answers the unknown method with Unimplemented, which surfaced as BoxliteError::Rpc (code=16) and failed the box. That agent's fused Container.Init -- still run on every boot -- already started the container, so treat Unimplemented as already-started instead of an error. The status code is inspected before `?` flattens it to Rpc(String); real Start errors still propagate. Also drop the boxlite/gvproxy feature from sdks/c (added in #994): it links the shim-side libgvproxy-sys CGO library into the C SDK, which the SDK/CLI must never do per the existing guard test. The tunnel API is host-side and needs only the rest feature, matching Python/Node/CLI. Claude-Session: https://claude.ai/code/session_01Vu4qDgCnMjnLPpNsroxeAP
📦 BoxLite review — couldn't completepowered by BoxLite |
|
tester seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
1 similar comment
|
tester seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughContainer startup now treats gRPC ChangesContainer startup compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Problem
PR #988 split the guest's fused
Container.InitintoInit(create) +Start(run init). The guest agent is baked into the versioned guest-rootfs and reused per-box across restarts, so a box created before #988 boots its old agent — which has noContainer.Start. The post-#988 host calls it, tonic returnsUnimplemented, and it surfaced asgRPC/tonic error … Unimplemented … (code=16), breaking restart/exec of pre-#988 boxes.Fix
ContainerInterface::startnow reads the gRPC status before?flattens it and treatsUnimplementedas "already started": on a pre-#988 agent the fusedInit(still called every boot) already ran init, soStartis a redundant no-op. Real errors still propagate.Also removes the spurious
boxlite/gvproxyfeature fromsdks/c(introduced in #994), which linked the shim-sidelibgvproxy-sysCGO library into the C SDK — the SDK/CLI must not, per the existingnet::testsguard. Matches Python/Node/CLI, which expose the same tunnel API withrestonly.Test
An in-process tonic stub guest returning
Unimplementedreproduces the exact failure throughContainerInterface::start; the degrade turns it green while a genuineStarterror still surfaces. Full boxlite + boxlite-shared unit suites pass (852 + 47).Deferred: the durable fix (re-inject/recreate the guest so restarts run the current agent, kata/Daytona-style) is not included here.
https://claude.ai/code/session_01Vu4qDgCnMjnLPpNsroxeAP
Summary by CodeRabbit