Skip to content

bootc: install to-filesystem fails when the host has no /run/udev (#2239) #313

Open

Description

@cgwalters-bot

Repo: bootc-dev/bootc

Task: bootc-dev/bootc#2239. The install aborts with Comparing filesystems at /run/udev and /proc/1//run/udev: No such file or directory on hosts such as a minimal EFI/HTTP-boot environment where udev has not created that directory. Locate the check, and make a missing /run/udev on either side non-fatal (treated as not applicable, with a debug log) while keeping the real mismatch error.

Acceptance: a unit test with the path missing and present (data-driven); cargo fmt --check, cargo clippy --all-targets, cargo test pass.

Constraints: code and tests only, no GitHub writes (the coordinator opens the PR); keep the change small and match the surrounding style; commit message in the project's style with a Generated-by: AI trailer, no Signed-off-by.

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

Activity

  1. added
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    and removed
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    on Oct 3, 2026
  2. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  3. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ dispatch ended well. Result: #313 (comment)

  4. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Triage (21 Oct 2026): valid and still wanted. The plan below fits in one small PR. I confirmed this by reading the code at upstream main de7ae55a. I did not run it on a udev-less host.

    • Cause: install calls ensure_mirrored_host_mount("/run/udev") with no condition. That function first creates the directory in the container. Then is_same_as_host calls statvfs on /proc/1/root/run/udev. On a host whose PID 1 has no /run/udev, such as busybox/mdev, that call returns ENOENT and the install aborts. Only the host side can be missing, because the container side was just created. The error message now reads /proc/1/root/run/udev, not /proc/1//run/udev, but the failure is the same. The reporter's workaround (mkdir /run/udev on the host) fits this cause.
    • Fixed already? No. I found no upstream or forge PR for it.
    • On @cgwalters' mdev question: I don't think mdev state needs mirroring. #2169 (merged) already makes blockdev fall back to blkid -p when /run/udev/data is absent (blockdev.rs#L17-L27). Once install skips the missing mount, that fallback covers lsblk/udev metadata. mdev keeps no comparable database under /run.
    • Fix: add an optional variant of the mirroring in crates/mount. If the host path is missing, it logs at debug level and returns. Use it for /run/udev only. /dev, /var/lib/containers and /var/tmp stay mandatory. is_same_as_host keeps its error for real failures.
    • Unclear: the tracker brief says "on either side", but the container side is always created first, so only the host side matters. The brief below handles the host side only. It also hasn't been tested end to end on an Alpine/mdev host; the unit test covers the decision only.

    Dispatch: dispatch reads a plan from an issue in its target repository, and cgwalters-forge/bootc has no issue for this yet. Open one there, then post the plan below on it with item set to that issue's number. It is wrapped in a text block here so it can't be dispatched from this tracker issue.

    Job plan
    ```agent-board-plan
    {
      "schema": "agent-board/job-plan/v1",
      "repo": "cgwalters-forge/bootc",
      "item": 0,
      "kind": "implement",
      "runner": "hosted",
      "brief": "Fix bootc-dev/bootc#2239: `bootc install to-filesystem` aborts with `Comparing filesystems at /run/udev and /proc/1/root/run/udev: No such file or directory` when the host's PID 1 has no /run/udev (for example an Alpine/busybox mdev host). Cause: crates/lib/src/install.rs calls bootc_mount::ensure_mirrored_host_mount(\"/run/udev\") with no condition. In crates/mount/src/mount.rs that function create_dir_all's the path locally and then calls is_same_as_host, which statvfs's /proc/1/root/run/udev and fails with ENOENT.\n\nDo:\n1. In crates/mount/src/mount.rs, add `pub fn ensure_optional_mirrored_host_mount(path)`. If the path does not exist under /proc/1/root (use try_exists and propagate any error other than not-found), log `tracing::debug!(\"Not present on host, skipping: {path}\")` and return Ok(()). Otherwise behave exactly like ensure_mirrored_host_mount. Do not create the local directory when skipping. Put the existence decision in a small private helper that takes the host root as a parameter, so a test can point it at a tempdir.\n2. In install.rs, use the optional variant for /run/udev only, with a comment saying blockdev already falls back to blkid when /run/udev/data is absent (bootc-dev/bootc#2169). Keep /dev, /var/lib/containers and /var/tmp mandatory. Leave is_same_as_host's error unchanged.\n\nTest: a data-driven unit test in mount.rs's tests module over the helper. Use a tempdir host root, and cover (a) run/udev missing, which must skip, and (b) run/udev present, which must mirror. Run `cargo fmt --check`, `cargo clippy --all-targets` and `cargo test -p bootc-mount` (check the crate name in crates/mount/Cargo.toml), plus `just validate` if it works in the sandbox. Keep the change small and in the surrounding style. Commit message in the project's style, ending with a `Generated-by: AI` trailer and no Signed-off-by. In the PR description, write `Refs bootc-dev/bootc#2239` and cgwalters-forge/tracker#313, say it was not tested end to end on an mdev host, and list the commands you ran with their exit status."
    }
    ```
    

    Generated by dispatch · ◷

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions