Repository navigation
install: Skip mirroring /run/udev when the host has none - #112
Draft
cgwalters-bot wants to merge 1 commit into
Draft
cgwalters-bot wants to merge 1 commit into
cgwalters-bot wants to merge 1 commit into
Conversation
## Executive summary `bootc install to-filesystem` fails on hosts without `/run/udev`, such as mdev-based hosts, because install always mirrors that path from the host. This makes only that mirror optional. If the host has no `/run/udev`, install logs at debug level and skips it without creating a local path. If the host has it, install creates a missing local mount point and compares filesystems and bind mounts as before. The other mirrors are still required. Errors other than not-found still propagate, and a path on a different filesystem still gets a bind mount. The blockdev code already falls back to `blkid` when there is no udev database. This replaces bootc-dev#101 and so also supersedes bootc-dev#97 and bootc-dev#72. It is bootc-dev#101's patch refreshed onto current main. The required and optional mirrors now share one implementation (`plan_mirror`/`ensure_mirror` with an `optional` flag), which answers bootc-dev#101's review comment about duplicated helpers. The data-driven tests now cover both modes for every combination of the path existing locally and on the host. They also check that nothing is created when the host path is missing, that ELOOP propagates, and how host paths are mapped. None of them need privileged mounts. While here, this replaces the remaining `str::len` calls that clippy.toml disallows with `as_bytes().len()`, which counts the same bytes. They are in `crates/ostree-ext/src/fixture.rs` (from bootc-dev#101), `crates/ostree-ext/tests/it/main.rs` and `crates/lib/src/deploy.rs`. These were meant to be a separate prep commit, but this handback produces a single patch, so they can be split out when promoting. ## Verification I ran this on Ubuntu 26.04 with Rust, rustfmt and clippy 1.94.1 from rustup, plus the ostree 2025.7 CLI. Podman cannot start containers in this sandbox, so the earlier Fedora 44 environment was not available. `cargo fmt --check` exited 0 and `cargo clippy --all-targets` exited 0 (on base 0ca885f it exits 101 at fixture.rs:274). **Acceptance is incomplete:** `cargo test --no-fail-fast` exited 101, with 542 passed, 1 failed and 4 ignored. The failure is `bootc-internal-utils` `command::tests::command_run_capture_stderr`, which fails the same way on base 0ca885f in this environment. Here `/bin/sh` is dash, and its `echo -e` handling differs from the bash that test expects, and I could not swap the shell without root or user namespaces. Full installation on an mdev host was not run. Review: one pass found no blockers. I applied its suggestions for a `host_path` test and clearer test panics. Still open: there is no integration test running install in a PID namespace without `/run/udev`. Also, `install to-disk` still runs `udevadm settle` unconditionally, so this fixes only to-filesystem and to-existing-root. Part of bootc-dev#57 Part of cgwalters-forge/tracker#313; references bootc-dev#2239. Generated-by: https://github.com/cgwalters/#llms
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executive summary
bootc install to-filesystemfails on hosts without/run/udev, such as mdev-based hosts, because install always mirrors that path from the host. This makes only that mirror optional. If the host has no/run/udev, install logs at debug level and skips it without creating a local path. If the host has it, install creates a missing local mount point and compares filesystems and bind mounts as before. The other mirrors are still required. Errors other than not-found still propagate, and a path on a different filesystem still gets a bind mount. The blockdev code already falls back toblkidwhen there is no udev database.This replaces #101 and so also supersedes #97 and #72. It is #101's patch refreshed onto current main. The required and optional mirrors now share one implementation (
plan_mirror/ensure_mirrorwith anoptionalflag), which answers #101's review comment about duplicated helpers. The data-driven tests now cover both modes for every combination of the path existing locally and on the host. They also check that nothing is created when the host path is missing, that ELOOP propagates, and how host paths are mapped. None of them need privileged mounts.While here, this replaces the remaining
str::lencalls that clippy.toml disallows withas_bytes().len(), which counts the same bytes. They are incrates/ostree-ext/src/fixture.rs(from #101),crates/ostree-ext/tests/it/main.rsandcrates/lib/src/deploy.rs. These were meant to be a separate prep commit, but this handback produces a single patch, so they can be split out when promoting.Verification
I ran this on Ubuntu 26.04 with Rust, rustfmt and clippy 1.94.1 from rustup, plus the ostree 2025.7 CLI. Podman cannot start containers in this sandbox, so the earlier Fedora 44 environment was not available.
cargo fmt --checkexited 0 andcargo clippy --all-targetsexited 0 (on base 0ca885f it exits 101 at fixture.rs:274). Acceptance is incomplete:cargo test --no-fail-fastexited 101, with 542 passed, 1 failed and 4 ignored. The failure isbootc-internal-utilscommand::tests::command_run_capture_stderr, which fails the same way on base 0ca885f in this environment. Here/bin/shis dash, and itsecho -ehandling differs from the bash that test expects, and I could not swap the shell without root or user namespaces. Full installation on an mdev host was not run.Review: one pass found no blockers. I applied its suggestions for a
host_pathtest and clearer test panics. Still open: there is no integration test running install in a PID namespace without/run/udev. Also,install to-diskstill runsudevadm settleunconditionally, so this fixes only to-filesystem and to-existing-root.Part of #57
Part of cgwalters-forge/tracker#313; references bootc-dev#2239.