Skip to content

sysroot: Fix root_is_ostree_booted detection for legacy bind mount#3593

Open
kixel-cz wants to merge 1 commit into
ostreedev:mainfrom
kixel-cz:debian-bootc-sysroot-detection
Open

sysroot: Fix root_is_ostree_booted detection for legacy bind mount#3593
kixel-cz wants to merge 1 commit into
ostreedev:mainfrom
kixel-cz:debian-bootc-sysroot-detection

Conversation

@kixel-cz
Copy link
Copy Markdown

When using legacy ostree bind mount (not composefs), the deployment root is a subpath of the physical root, not a bind mount of /sysroot. In this case, / and /sysroot have different inodes, causing root_is_ostree_booted to be incorrectly set to FALSE.

This breaks bootc status on Debian systems where ostree-prepare-root uses legacy bind mount mode. Fix by also considering the system as ostree-booted when the sysroot path is /sysroot and ostree-booted flag exists.

Fixes: bootc on Debian with legacy ostree bind mount

When using legacy ostree bind mount (not composefs), the deployment
root is a subpath of the physical root, not a bind mount of /sysroot.
In this case, / and /sysroot have different inodes, causing
root_is_ostree_booted to be incorrectly set to FALSE.

This breaks bootc status on Debian systems where ostree-prepare-root
uses legacy bind mount mode. Fix by also considering the system as
ostree-booted when the sysroot path is /sysroot and ostree-booted
flag exists.

Fixes: bootc on Debian with legacy ostree bind mount
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 21, 2026

Hi @kixel-cz. Thanks for your PR.

I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ostree_sysroot_initialize function in src/libostree/ostree-sysroot.c to expand the criteria for identifying an ostree-booted system. It now considers the system booted if the sysroot path is /sysroot, which accommodates Debian bootc systems using legacy ostree bind mounts where the root is a deployment subpath. I have no feedback to provide as there were no review comments to evaluate.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant