fix(install): Fedora Silverblue detection for k3s-selinux #11167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Fixes detection of Fedora Silverblue based systems so SELinux can be configured correctly (it's required for services running in systemd).
The first time the script is run there will still be an error, because reboot is required to install the k3s-selinux RPM.
After the reboot, the script now correctly applies the rest of the changes needed.
It's another "else if" but consistent with the existing detection code and shouldn't affect any other systems.
Types of Changes
Bugfix affecting Fedora Silverblue based systems only.
Verification
I tested the installation procedure on Bluefin, now just a reboot is needed but no more manual changes to the script.
After installing k3s-linux and reboot, run the commands again and k3s will be installed correctly now.
The only small issue that is still there is the need to start the service when installing as server:
Fixing this would require some refactoring first, so opted for minimum amount of code fixing the main problem.
Linked Issues
Related to #9361
User-Facing Change
install script now passes fine without the need to introduce temporary changes to it.
Further Comments