sysroot: Fix root_is_ostree_booted detection for legacy bind mount#3593
sysroot: Fix root_is_ostree_booted detection for legacy bind mount#3593kixel-cz wants to merge 1 commit into
Conversation
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
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
There was a problem hiding this comment.
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.
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