Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

kola: Add checks for SELinux AVC messages #572

Open
wants to merge 6 commits into
base: flatcar-master
Choose a base branch
from

Conversation

krnowak
Copy link
Member

@krnowak krnowak commented Jan 7, 2025

This adds a check for SELinux AVC messages in the kola test suite with an option of skipping it.

@krnowak krnowak force-pushed the krnowak/avc-check branch from b3dd673 to 1b7b540 Compare January 8, 2025 15:29
@krnowak
Copy link
Member Author

krnowak commented Jan 8, 2025

Kola does some checks after every test run. They are just regexps,
that will cause the test to fail if they match. The regexps are being
run over the contents of the console output and journal. We add
another check to match the AVC denial line ("avc: denied { … } …").
There is a flag to skip the check in case a test wants to actually
generate an AVC and check for it itself.
These start off with an old version of Flatcar and get updated to a
new one.
It wasn't exposed through any command-line flag and it seems that it
was meant to be always set to true for Flatcar versions greater than
3033, which means anything that is newer than the already unsupported
LTS-2022. It is basically a dead code now, so drop it.
When we are running our tests on Github or in Jenkins, we always know
what version of Flatcar the image used for testing has. So instead of
figuring it out by creating a throw-away cluster, make it possible to
provide the image version through a command-line flag. This commit
drops the fast-track code-path that was skipping the version query, so
in order to avoid the overhead of creating a cluster, passing the
version through the command line is required.

This also fixes an issue of SELinux AVC not being ignored on older
versions of the image if getting the image version from the cluster
was for some reason skipped.
@krnowak krnowak marked this pull request as ready for review February 7, 2025 13:47
@krnowak krnowak requested a review from a team February 7, 2025 13:47
@krnowak
Copy link
Member Author

krnowak commented Feb 7, 2025

CI results above - I don't think that any failures are related to this PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Testing / in Review
Development

Successfully merging this pull request may close these issues.

1 participant