Repository navigation
fix(minvmd): carry the egress deny-all opt-out to the guest daemon - #2023
norrietaylor merged 3 commits into
Conversation
The microVM guest daemon (pid-1) hardcoded egress_deny_all_opt_out to false, so the NET-077 opt-out could never reach a VM-backed host. The host daemon reads --egress-deny-all-opt-out, but the guest has no flags to read. Hand the opt-out across the boot line the way the proxy port and publish generation already travel: minvmd reads MINVMD_EGRESS_DENY_ALL_OPT_OUT from the operator's environment and writes MINIMALD_EGRESS_DENY_ALL_OPT_OUT onto the kernel command line; the guest's pid-1 fills the field from it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds an egress deny-all opt-out setting. ChangesEgress deny-all opt-out
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant OperatorEnvironment
participant minvmd
participant minimald_pid1
OperatorEnvironment->>minvmd: Provide opt-out setting
minvmd->>minvmd: Parse setting and compose kernel command line
minvmd->>minimald_pid1: Pass opt-out token when enabled
minimald_pid1->>minimald_pid1: Read token and log resolved value
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The opt-out handoff has no identified merge-blocking issue; it is ready for normal merge checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the boot-line key, Comment |
…ument it Split the minvmd env parse into a pure helper and test that only the MINVMD_VM_OWN_IP truthy set opts out; widen the guest test to garbage values; log the boot-line opt-out at guest startup for diag bundles; and document MINVMD_EGRESS_DENY_ALL_OPT_OUT in cli-minvmd.md (NET-077).
|
/review |
|
@coderabbitai review |
|
Approved: no findings at Nothing to do. Clobber: none: |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
CodeRabbit and minimal-review approved this head; 0 unresolved threads; all lanes green.
Summary
The microVM guest daemon (pid-1) hardcoded
egress_deny_all_opt_outtofalse, so the NET-077 deny-all egress opt-out could never reach a VM-backed host. The host daemon reads--egress-deny-all-opt-out, but the guest has no flags to read.This hands the opt-out across the boot line the same way the proxy port and publish generation already travel:
minvmdreadsMINVMD_EGRESS_DENY_ALL_OPT_OUTfrom the operator environment (truthy:1/true/yes/on, mirroringMINVMD_VM_OWN_IP) and writesMINIMALD_EGRESS_DENY_ALL_OPT_OUT=1onto the kernel command line.egress_deny_all_opt_outfrom it.Unset, the token is absent and the guest runs the egress default its host build ships — no behavior change for existing runs.
Verification
cargo fmt --all --check— cleancargo clippy --workspace --all-targets --locked -- -D warnings— cleancargo test --locked -p minvmd --lib the_egress_opt_out_rides— passcargo test --locked -p minimald --lib the_egress_opt_out_is_read— passRouting-Key: inbox-route/I_kwDOSUhdos8AAAABVSwPVQ
Summary by CodeRabbit
egresssection. Set it to1,true,yes, oron(case-insensitive); unset or unrecognized values do not enable the opt-out.