8000 T66 — Spawn gvproxy and the VMM child through sudo -n as their dedicated users · Issue #2566 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
8000

T66 — Spawn gvproxy and the VMM child through sudo -n as their dedicated users #2566

Open

Description

@norrietaylor

Task

slice size difficulty model who estimated lines
Proxy as the operator, VM as its own user L unknown ground strongest an agent 720 (420 code, 300 tests)

Where the vm-users drop-in is installed, gvproxy runs as minimal-gvproxy and the VMM child as minimal-vmm, each spawned through sudo -n under the drop-in, with their files in vmm/ and the gvproxy dirs at the T57 design's modes; where it is not, both run as the login user and min finalize-install names why.

Covers:

  • BEP-047

Layers:

  • spawn:
    • crates/minvmd/src/cmd/run.rs: spawns gvproxy and the VMM child through sudo -n -u under the drop-in, each in a new process group, never sending SIGKILL to that sudo; moves ssh.sock, timekeep.sock, boot.log and data-vol.raw into vmm/, the switch socket to <gvproxy dir>, and gvproxy.yaml and gvproxy-bep.sock to <gvproxy config dir>; verifies the modes of vmm/boot.log and vmm/data-vol.raw; refuses to start when the drop-in is installed and sudo -n fails; when the drop-in is not installed (the binaries sit under a path the login user can write, or the dedicated users cannot reach the provider dir), spawns gvproxy and the VMM child as the login user with today's layout (split from T65 on 2026-10-25 by the epic owner; arch C1 on feat(minimal): lay out the split VM users, directories and socket modes (T65) #2561; owner ruling on gominimal/arch#143, 2026-10-26)
    • crates/minvmd/src/net.rs: HostGvproxy::spawn starts gvproxy through sudo -n -u minimal-gvproxy, and GvproxyConfig::with_config_path writes gvproxy.yaml at 0640 group minimal-gvproxy
    • crates/minvmd/src/cmd/vmm_child.rs: takes the gate socket path from <gate dir>, reads its per-run values on descriptor 0, and sets the mode of ssh.sock after libkrun binds it
    • crates/minvmd/src/vm.rs: reads the per-run values the VMM child receives on descriptor 0 in place of the environment
    • crates/minvmd/src/image.rs: reads the image paths from those per-run values in place of the environment
    • crates/minvmd/src/telemetry.rs: reads the telemetry setting from those per-run values in place of the environment
    • crates/minvmd/src/cmd/stop.rs: stops a VMM child that runs as another user through the __stop-group stop rule in place of signalling vmm_pid
    • crates/minvmd/src/main.rs: the hidden __stop-group subcommand, and __krun-vmm takes the literal argument the drop-in names
    • crates/minimal-client/src/attach.rs: min finds the ssh socket at vmm/ssh.sock
    • crates/minimal/src/cmd/finalize_install.rs: offers the vm-users item again, moves an existing data-vol.raw into vmm/ as root, and installs the drop-in whose rules match the spawns as minvmd defines them; on a host that cannot meet Gatehouse §6.10 line 831 the item stays not possible and names the reason, which is where the user sees that the split users are not set up (gominimal/arch#143)
    • cargo nextest run -p minvmd gvproxy_and_vmm_run_as_their_dedicated_users
    • cargo nextest run -p minvmd without_the_drop_in_gvproxy_and_vmm_run_as_the_login_user

Waits on:

Plan block
### T66 — Spawn gvproxy and the VMM child through sudo -n as their dedicated users
  slice: S8
  kind: task
  covers: BEP-047
  size: L
  est: 420 code, 300 tests
  executor: agent
  difficulty: unknown ground
  model: strongest
  diagnostics: when the vm-users drop-in is installed and `minimal-vmm` or `minimal-gvproxy` is missing, or `sudo -n` cannot run a spawn, the VM host daemon refuses to start with the error the T57 design's ownership model names, on stderr; on a host without the drop-in, the VM runs as the login user and `min finalize-install` shows the vm-users item as not possible, with the reason
  observability: one info log line at start naming the user gvproxy and the VMM child run as, the login user included
  layers:
    - spawn:
      - crates/minvmd/src/cmd/run.rs: spawns gvproxy and the VMM child through `sudo -n -u` under the drop-in, each in a new process group, never sending SIGKILL to that `sudo`; moves `ssh.sock`, `timekeep.sock`, `boot.log` and `data-vol.raw` into `vmm/`, the switch socket to `<gvproxy dir>`, and `gvproxy.yaml` and `gvproxy-bep.sock` to `<gvproxy config dir>`; verifies the modes of `vmm/boot.log` and `vmm/data-vol.raw`; refuses to start when the drop-in is installed and `sudo -n` fails; when the drop-in is not installed (the binaries sit under a path the login user can write, or the dedicated users cannot reach the provider dir), spawns gvproxy and the VMM child as the login user with today's layout (split from T65 on 2026-10-25 by the epic owner; arch C1 on #2561; owner ruling on gominimal/arch#143, 2026-10-26)
      - crates/minvmd/src/net.rs: `HostGvproxy::spawn` starts gvproxy through `sudo -n -u minimal-gvproxy`, and `GvproxyConfig::with_config_path` writes `gvproxy.yaml` at 0640 group `minimal-gvproxy`
      - crates/minvmd/src/cmd/vmm_child.rs: takes the gate socket path from `<gate dir>`, reads its per-run values on descriptor 0, and sets the mode of `ssh.sock` after libkrun binds it
      - crates/minvmd/src/vm.rs: reads the per-run values the VMM child receives on descriptor 0 in place of the environment
      - crates/minvmd/src/image.rs: reads the image paths from those per-run values in place of the environment
      - crates/minvmd/src/telemetry.rs: reads the telemetry setting from those per-run values in place of the environment
      - crates/minvmd/src/cmd/stop.rs: stops a VMM child that runs as another user through the `__stop-group` stop rule in place of signalling `vmm_pid`
      - crates/minvmd/src/main.rs: the hidden `__stop-group` subcommand, and `__krun-vmm` takes the literal argument the drop-in names
      - crates/minimal-client/src/attach.rs: `min` finds the ssh socket at `vmm/ssh.sock`
      - crates/minimal/src/cmd/finalize_install.rs: offers the vm-users item again, moves an existing `data-vol.raw` into `vmm/` as root, and installs the drop-in whose rules match the spawns as minvmd defines them; on a host that cannot meet Gatehouse §6.10 line 831 the item stays not possible and names the reason, which is where the user sees that the split users are not set up (gominimal/arch#143)
      test: cargo nextest run -p minvmd gvproxy_and_vmm_run_as_their_dedicated_users
      test: cargo nextest run -p minvmd without_the_drop_in_gvproxy_and_vmm_run_as_the_login_user
  produces: none
  consumes: none
  proof: Where the vm-users drop-in is installed, gvproxy runs as `minimal-gvproxy` and the VMM child as `minimal-vmm`, each spawned through `sudo -n` under the drop-in, with their files in `vmm/` and the gvproxy dirs at the T57 design's modes; where it is not, both run as the login user and `min finalize-install` names why.
  depends on:
    - blocked by T65

Generated by Claude Code

Activity

  1. added
    kind:taskA task the plan skill rendered; the body carries ## Task
    size:L500 to 900 net lines; one PR, and the ceiling
    model:strongestThe strongest model available: unknown ground, or large work that needs care
    on Oct 25, 2026
  2. norrietaylor commented on Oct 25, 2026

    @norrietaylor
    MemberAuthor

    Held by the epic owner on 2026-10-25 until arch rules on gominimal/arch#143. The sudoers drop-in this task installs must name root-owned binaries, but the default install puts minvmd and gvproxy in $HOME/.local/bin, and a 0700 home blocks the dedicated users from the provider dir. The ruling decides where the binaries and the provider dir live, which changes this task's layers. Split from T65 (#2560) per arch C1 on #2561.


    Generated by Claude Code

  3. added
    needs-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.
    on Oct 25, 2026
  4. norrietaylor commented on Oct 26, 2026

    @norrietaylor
    MemberAuthor

    Amended on 2026-10-26 after the epic owner's ruling on gominimal/arch#143 (https://github.com/gominimal/arch/issues/143#issuecomment-6409882754): a host that cannot meet Gatehouse §6.10 line 831 runs the VM as the login user, and says so.

    • run.rs: spawns through sudo -n only where the vm-users drop-in is installed, and refuses to start when it is installed and sudo -n fails. Where it is not installed, gvproxy and the VMM child run as the login user with today's layout.
    • finalize_install.rs: on such a host the vm-users item stays not possible and names the reason. That is the surface where the user sees that the split users are not set up. Nothing prints before the box shell.
    • New test: cargo nextest run -p minvmd without_the_drop_in_gvproxy_and_vmm_run_as_the_login_user.

    The hold is lifted, and the plan comment carries the same text.


    Generated by Claude Code

  5. removed
    needs-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.
    on Oct 26, 2026
  6. minimal-foundry commented on Oct 26, 2026

    @minimal-foundry
    Contributor

    **The coder changed nothing: noop: the task cannot be done inside its layers. Every layer path exists at the branch head, and T65 (be9202e) has landed. The problem is a missing piece of the design, not a wrong path.

    The split layout in the T57 design (docs/design/2026-10-25-split-user-vmm-provider-dir.md, 'Ownership model' and 'What T38 changes') depends on the EGW process. The EGW process is a minvmd __egw process that runs as minimal-gvproxy. It holds the egress gate and the switch::bep_host leg. No task layer creates it, and the tree does not have it: rg -n '__egw|egw' crates/minvmd/src finds only comments in sock.rs. The egress gate still runs in the supervisor as the login user (crates/minvmd/src/net.rs, the EgressGate::spawn(shuttle::gate_sock_beside(&sock), sock.clone(), ...) call near line 840).

    Under the layout the task asks for, that supervisor gate cannot work, for two reasons:

    1. gvproxy runs as minimal-gvproxy under the drop-in's umask=0077. It binds `/gvproxy-switch.…[truncated]. No pull request was opened.**

    branch agent/2566-spawn-gvproxy-and-the-vmm-child-through-sudo-n-a · epic #1501

    Updated 2026-10-26T07:19:57.553Z.

  7. added
    needs-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.
    on Oct 26, 2026
  8. norrietaylor commented on Oct 31, 2026

    @norrietaylor
    MemberAuthor

    Deferred on 2026-10-31 by the owner in the #1501 close-out. This task leaves slice S8 (#2256) and the #1501 plan. The split-user work moves to the follow-on epic gominimal/inbox#1184, with BEP-047, which spec 24 moves to Non-goals in #2768. This issue stays open for that epic to take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:taskA task the plan skill rendered; the body carries ## Taskmodel:strongestThe strongest model available: unknown ground, or large work that needs careneeds-humanAn agent handed off; a human must act, then clear this label. Set by defer and handoffs.size:L500 to 900 net lines; one PR, and the ceiling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0