install: Fix bug in mount point check#1904
Conversation
This fixes a regression from bootc-dev#1727 by removing the unnecessary mount point check prior to the recursive function call. Also adds some tracing statements and updates the integration test to validate the mount check works for this scenario: /boot/efi mounted with contents in /boot/efi/EFI/firmware/foo Signed-off-by: ckyrouac <ckyrouac@redhat.com>
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a regression in the mount point check within require_dir_contains_only_mounts by removing a redundant and incorrect condition. The change is simple and effective. The addition of tracing statements is a good improvement for debugging. Furthermore, the integration test has been enhanced to validate the fix for the specific scenario of a mounted /boot/efi with content, and its robustness is improved with LVM cleanup steps and clearer variable names. The changes are well-justified and look solid.
|
This seemed to work for me with a mounted /boot/efi: |
| let sh = &xshell::Shell::new()?; | ||
| reset_root(sh, image)?; | ||
|
|
||
| // Clean up any leftover LVM state from previous failed runs |
There was a problem hiding this comment.
For the future: This seems like it could have been a separate prep commit - then if there's a bug in this change and we need to revert it we wouldn't revert this cleanup.
|
The failure comes from grub2 regression. #1905 (comment) |
Add a `gating` matrix property to test-integration jobs. Jobs with `gating: false` use `continue-on-error: true`, allowing them to fail without blocking PR merges. Mark fedora-44 as non-gating due to a grub2 regression in the base image (https://bugzilla.redhat.com/show_bug.cgi?id=2429501). Assisted-by: OpenCode (Claude Sonnet 4) Signed-off-by: Colin Walters <walters@verbum.org>
It was using 12G, reduce it down to 1G to avoid the github runner running out of space. Signed-off-by: ckyrouac <ckyrouac@redhat.com>
|
Oh wow it was disk space again? We should probably add something to our GHA runs by default that shows the free space at end or so. |
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904. The test builds a container image with an embedded disk.yaml that creates a partition layout WITHOUT a separate /boot partition - just root (/) with /boot/efi as a separate mount point. This partition layout triggers the bug from issue bootc-dev#1907 where bootc's empty rootfs verification would fail with: "Found entry in boot: efi" The issue was that when /boot is a directory on the root filesystem (not a separate partition), but /boot/efi IS a mount point on a different device, the old code incorrectly saw "efi" as a regular directory entry rather than recognizing it was a mount point boundary. Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this test to fail with the expected error message. Closes: bootc-dev#1907
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904. The test builds a container image with an embedded disk.yaml that creates a partition layout WITHOUT a separate /boot partition - just root (/) with /boot/efi as a separate mount point. This partition layout triggers the bug from issue bootc-dev#1907 where bootc's empty rootfs verification would fail with: "Found entry in boot: efi" The issue was that when /boot is a directory on the root filesystem (not a separate partition), but /boot/efi IS a mount point on a different device, the old code incorrectly saw "efi" as a regular directory entry rather than recognizing it was a mount point boundary. Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this test to fail with the expected error message. This was already fixed by bootc-dev@ab65078 but we didn't realize at the time the scope. Closes: bootc-dev#1907 Signed-off-by: Colin Walters <walters@verbum.org>
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904. The test builds a container image with an embedded disk.yaml that creates a partition layout WITHOUT a separate /boot partition - just root (/) with /boot/efi as a separate mount point. This partition layout triggers the bug from issue bootc-dev#1907 where bootc's empty rootfs verification would fail with: "Found entry in boot: efi" The issue was that when /boot is a directory on the root filesystem (not a separate partition), but /boot/efi IS a mount point on a different device, the old code incorrectly saw "efi" as a regular directory entry rather than recognizing it was a mount point boundary. Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this test to fail with the expected error message. This was already fixed by bootc-dev@ab65078 but we didn't realize at the time the scope. Closes: bootc-dev#1907 Signed-off-by: Colin Walters <walters@verbum.org>
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904. The test builds a container image with an embedded disk.yaml that creates a partition layout WITHOUT a separate /boot partition - just root (/) with /boot/efi as a separate mount point. This partition layout triggers the bug from issue bootc-dev#1907 where bootc's empty rootfs verification would fail with: "Found entry in boot: efi" The issue was that when /boot is a directory on the root filesystem (not a separate partition), but /boot/efi IS a mount point on a different device, the old code incorrectly saw "efi" as a regular directory entry rather than recognizing it was a mount point boundary. Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this test to fail with the expected error message. This was already fixed by bootc-dev@ab65078 but we didn't realize at the time the scope. Closes: bootc-dev#1907 Signed-off-by: Colin Walters <walters@verbum.org>
Add a TMT test that exercises the mount point check fix from PR #1904. The test builds a container image with an embedded disk.yaml that creates a partition layout WITHOUT a separate /boot partition - just root (/) with /boot/efi as a separate mount point. This partition layout triggers the bug from issue #1907 where bootc's empty rootfs verification would fail with: "Found entry in boot: efi" The issue was that when /boot is a directory on the root filesystem (not a separate partition), but /boot/efi IS a mount point on a different device, the old code incorrectly saw "efi" as a regular directory entry rather than recognizing it was a mount point boundary. Verified that temporarily reverting the fix from PR #1904 causes this test to fail with the expected error message. This was already fixed by ab65078 but we didn't realize at the time the scope. Closes: #1907 Signed-off-by: Colin Walters <walters@verbum.org>
This fixes a regression from #1727 by removing the unnecessary mount point check prior to the recursive function call. Also adds some tracing statements and updates the integration test to validate the mount check works for this scenario:
/boot/efi mounted with contents in /boot/efi/EFI/firmware/foo