8000 fix(minvmd): carry the egress deny-all opt-out to the guest daemon by gominimal-aw-bot[bot] · Pull Request #2023 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minvmd): carry the egress deny-all opt-out to the guest daemon - #2023

Merged
norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/egress-deny-all-opt-out-guest-handoff-36d4664c1becc31b
Oct 6, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/egress-deny-all-opt-out-guest-handoff-36d4664c1becc31b

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Summary

The microVM guest daemon (pid-1) hardcoded egress_deny_all_opt_out to false, 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:

  • minvmd reads MINVMD_EGRESS_DENY_ALL_OPT_OUT from the operator environment (truthy: 1/true/yes/on, mirroring MINVMD_VM_OWN_IP) and writes MINIMALD_EGRESS_DENY_ALL_OPT_OUT=1 onto the kernel command line.
  • The guest daemon reads that boot token and fills egress_deny_all_opt_out from 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 — clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • cargo test --locked -p minvmd --lib the_egress_opt_out_rides — pass
  • cargo test --locked -p minimald --lib the_egress_opt_out_is_read — pass

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVSwPVQ

Summary by CodeRabbit

  • New Features
    • Added a boot-time setting to opt out of the allow-all egress default when a box has no egress section. Set it to 1, true, yes, or on (case-insensitive); unset or unrecognized values do not enable the opt-out.
  • Documentation
    • Clarified Linux provider selection, VM startup commands, and how resource parameters are checked and saved for the next boot.

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>
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 6, 2026
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 6, 2026 18:59
@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f874d247-938a-4308-a819-06bafa54701a
📥 Commits

Reviewing files that changed from the base of the PR and between 2367ec6 and 82a481d.

📒 Files selected for processing (4)
  • crates/minimald/src/guest.rs
  • crates/minimald/src/main.rs
  • crates/minvmd/src/vm.rs
  • docs/reference/cli-minvmd.md

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds an egress deny-all opt-out setting. minvmd parses the setting and adds a guest boot-line token when enabled. The guest reads the token at startup. Tests cover parsing and token placement, and the CLI reference documents the setting and related commands.

Changes

Egress deny-all opt-out

Layer / File(s) Summary
Opt-out token parsing
crates/minimald/src/guest.rs, crates/minvmd/src/vm.rs
Both components recognize trimmed, case-insensitive values 1, true, yes, and on. The guest reader and minvmd parser return false for unset or unrecognized values.
Boot-line handoff and guest startup
crates/minvmd/src/vm.rs, crates/minimald/src/main.rs, docs/reference/cli-minvmd.md
VmConfig passes the parsed setting to kernel_cmdline, which adds the guest token when enabled. Guest startup reads and logs the resolved value. Tests cover token placement and parsing. The CLI reference documents the setting and updates command descriptions.

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
Loading

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 82a48

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)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: passing the egress deny-all opt-out to the guest daemon.
Description check ✅ Passed The description explains the change and its purpose, and reports specific verification commands and results. It uses “Verification” instead of “Testing” and omits the checklist, but the description is…
Docstring Coverage ✅ Passed Docstring coverage is 95.65% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 3 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the boot-line key,
And hops where truth is set to “yes.”
The guest reads what the host passed through,
While tests confirm each token’s place.
Then carrots celebrate the flow.

Comment @coderabbitai help to get the list of available commands.

…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).
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 6, 2026
@norrietaylor norrietaylor changed the title fix: fix(minvmd): carry egress deny-all opt-out to the guest daemon fix(minvmd): carry the egress deny-all opt-out to the guest daemon Oct 6, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

@norrietaylor
Copy link
Copy Markdown
Member

@coderabbitai review

@minimal-foundry
minimal-foundry Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 82a481d8171d.

Nothing to do.

Clobber: none: git log on all three crates shows the PR's own commits (403bb9c1, 42345671, 82a481d8) on top of the base; no recent fix is reverted.

@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 6, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeRabbit and minimal-review approved this head; 0 unresolved threads; all lanes green.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 6, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit a68323d Oct 6, 2026
38 of 40 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/egress-deny-all-opt-out-guest-handoff-36d4664c1becc31b branch October 6, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0