Skip to content

install: Skip mirroring /run/udev when the host has none - #72

Draft
cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-41275440032
Draft

cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-41275440032

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Collaborator

bootc install to-filesystem fails on hosts without /run/udev, such as mdev-based ones, because install mirrors it from the host unconditionally and the host-side statvfs fails with ENOENT. The workaround is creating an empty /run/udev on the host.

Now only the /run/udev mirror is optional: if the path is missing on the host, we debug-log and skip it without creating a local mount point. Otherwise it behaves as before: create the local directory, compare fsids, bind mount if they differ. All other errors still propagate. The other mirrored mounts are unchanged. Without udev state, blockdev already falls back to blkid.

One deviation from the issue: a missing local /run/udev with a present host one is still created and bind mounted, not skipped. In a plain podman run container it usually doesn't exist yet, so skipping there would turn the mirror off entirely.

Verified with a data-driven unit test covering present/missing paths on each side, plus a different-filesystem case that needs a bind mount. cargo test shows the same 20 failures as on the base commit, all environmental (missing ostree, the /bin/sh echo behavior, etc-merge permissions). cargo check --all-targets is clean. cargo fmt --check and cargo clippy were not run because rustfmt and clippy aren't installed in the build environment. A full install on an mdev host was not run.

Review: one pass, no blockers. I added the bind-case test it asked for. Open nits: the optional helper partly duplicates ensure_mirrored_host_mount, and errors from it name only the local path.

Part of cgwalters-forge/tracker#313 (bootc-dev#2239).

Closes #57

Generated by dispatch · ◷

`bootc install to-filesystem` fails on hosts without `/run/udev`, such as mdev-based ones, because install mirrors it from the host unconditionally and the host-side statvfs fails with ENOENT. The workaround is creating an empty `/run/udev` on the host.

Now only the `/run/udev` mirror is optional: if the path is missing on the host, we debug-log and skip it without creating a local mount point. Otherwise it behaves as before: create the local directory, compare fsids, bind mount if they differ. All other errors still propagate. The other mirrored mounts are unchanged. Without udev state, blockdev already falls back to blkid.

One deviation from the issue: a missing local `/run/udev` with a present host one is still created and bind mounted, not skipped. In a plain `podman run` container it usually doesn't exist yet, so skipping there would turn the mirror off entirely.

Verified with a data-driven unit test covering present/missing paths on each side, plus a different-filesystem case that needs a bind mount. `cargo test` shows the same 20 failures as on the base commit, all environmental (missing `ostree`, the `/bin/sh` echo behavior, etc-merge permissions). `cargo check --all-targets` is clean. `cargo fmt --check` and `cargo clippy` were not run because rustfmt and clippy aren't installed in the build environment. A full install on an mdev host was not run.

Review: one pass, no blockers. I added the bind-case test it asked for. Open nits: the optional helper partly duplicates `ensure_mirrored_host_mount`, and errors from it name only the local path.

Part of cgwalters-forge/tracker#313 (bootc-dev#2239).

Generated-by: https://github.com/cgwalters/#llms
@cgwalters-bot cgwalters-bot added the needs-human The poll stopped here; a person decides what is next label Nov 1, 2026
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

The poll stopped following this pull request: a draft with no checkpoint; mark it ready if the work is complete. It is labelled needs-human; remove the label to have the poll start again on it, with fresh fix rounds.

Generated-by: https://github.com/cgwalters/#llms

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

Labels

review:quick High-confidence bot draft: skim and approve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant