Skip to content

Conversation

@vojtapolasek
Copy link
Collaborator

Description:

  • extend the platform by checking either for /ostree symlink or presence of /run/ostree-booted regular file

Rationale:

it was discovered that there are two distint cases when we can be in the bootc environment. The first one is while the bootc image is actually hardened during its creation. This is manifested by presence of /ostree symlink. The second case is when we are in already booted bootc image. This was already covered before, but the file /run/ostree-booted is not present when building the image. Switching only to check for the /ostree symlink does not work as well, because in case of running bootc image, the /ostree is a directory, not a symlink. I think this covers both cases well and with reasonable accuracy.

Review Hints:

Try hardening a bootc image and also anaconda rpmostree installation case.

…ine state

it was discovered that there are two distint cases when we can be in the bootc environment.
The first one is while the bootc image is actually hardened during its creation.
This is manifested by presence of /ostree symlink.
The second case is when we are in already booted bootc image.
This was already covered before, but the file /run/ostree-booted is not present when building the image.
Switching only to check for the /ostree symlink does not work as well, because in case of running bootc image, the /ostree is a directory, not a symlink.
I think this covers both cases well and with reasonable accuracy.
@vojtapolasek vojtapolasek added this to the 0.1.79 milestone Nov 7, 2025
@vojtapolasek vojtapolasek added the CPE-AL CPE Applicability Language label Nov 7, 2025
@vojtapolasek
Copy link
Collaborator Author

I have mistakengly pushed the branch into the main repo, not my fork. I hope it does not matter.

@openshift-ci
Copy link

openshift-ci bot commented Nov 7, 2025

@vojtapolasek: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-platform-compliance 8b5f8f5 link true /test e2e-aws-openshift-platform-compliance
ci/prow/e2e-aws-openshift-node-compliance 8b5f8f5 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@jan-cerny jan-cerny self-assigned this Nov 10, 2025
Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

This fixes the failing /hardening/container/ tests on RHEL 9 for me.

@jan-cerny jan-cerny merged commit 04f764c into master Nov 10, 2025
150 of 152 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CPE-AL CPE Applicability Language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants