Skip to content

fix(shares): mount 9p shares on every boot, not just the first - #42

Merged
NovusEdge merged 2 commits into
mainfrom
fix-9p-share-remount
Aug 10, 2026
Merged

fix(shares): mount 9p shares on every boot, not just the first#42
NovusEdge merged 2 commits into
mainfrom
fix-9p-share-remount

Conversation

@NovusEdge

Copy link
Copy Markdown
Owner

A disk VM's host/work shares mounted at apply time, then vanished on the next boot: the mountpoints were empty even though /etc/fstab had the lines.

The 9p fstab options carried _netdev. openrc runs localmount in the boot runlevel and skips _netdev entries, deferring them to netmount. stoat enables localmount, never netmount, so nothing mounted the shares on a plain boot. They mounted only because sshx.mountShares runs mount directly during apply.

virtio-9p enumerates during kernel init and needs no network, so localmount is the correct service. This drops _netdev and keeps nofail (a guest kernel with no 9p module still boots). The apply mount step also strips a stale _netdev from an already-installed VM's fstab, so stoat apply <vm> repairs a VM built before this.

Verified on a running disk VM: mount /mnt/work succeeds, the device and module are fine; the failure was openrc never invoking the mount at boot. Tests cover the new option string and the repair.

Cloud-init's 9p path (systemd, different mount semantics) is untouched.

Addresses six architectural issues:
1. Delete v1 metadata parser (dual parsers)
2. Add dependency ordering (depends field)
3. Add dry-run (--dry-run, --json)
4. Implement stage field (install-stage recipes)
5. Document single-reboot behavior
6. Add cloudinit post-boot SSH path
The host and work 9p lines carried _netdev. openrc runs localmount in the
boot runlevel and skips _netdev entries, leaving them for netmount. stoat
enables localmount, never netmount, so the shares mounted only at apply time
(sshx.mountShares runs mount directly) and never again. A disk VM lost both
shares on its next boot; the mountpoints stayed empty.

virtio-9p enumerates during kernel init and needs no network, so localmount
is the right service. Drop _netdev; keep nofail so a guest with no 9p module
still boots. The apply mount step now also strips a stale _netdev from an
already-installed VM's fstab, so stoat apply repairs a VM built before this.
@NovusEdge NovusEdge added the bug Something isn't working label Aug 10, 2026
@NovusEdge NovusEdge self-assigned this Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@NovusEdge, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8830bcdf-e200-4f4f-92e1-47c30fe772c0

📥 Commits

Reviewing files that changed from the base of the PR and between 17759f5 and 37ce3ae.

📒 Files selected for processing (5)
  • docs/specs/2026-08-10-recipe-system-fixes-design.md
  • internal/apkovl/apkovl_test.go
  • internal/apkovl/mount9p.go
  • internal/sshx/sharemount.go
  • internal/sshx/sharemount_test.go

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.

❤️ Share

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

@NovusEdge
NovusEdge merged commit af6c143 into main Aug 10, 2026
7 of 8 checks passed
@NovusEdge
NovusEdge deleted the fix-9p-share-remount branch August 10, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant