Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow overriding /etc/os-release VERSION_ID #7432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taotriad
Copy link

Proposed Changes

This change enables installation on (some) not supported Red Hat-based distributions, without the additional burden of adding explicit support.

The new environment variable should be documented in the installation help.

Types of Changes

Distros in the same OS-family may have widely varying versioning systems, yet be closely related and would work if the version isn't misidentified; for instance installing RKE2 on Fedora works fine when the VERSION_ID is set to 8, while the default fallback value for unknown versions (7) doesn't work.

This change adds a new environment variable (INSTALL_RKE2_OVERRIDE_OS_VERSION_ID) which, if set, will override the value from /etc/os-release; if the variable is not set, installation behaves as normal.

Note: This change does not affect SUSE-like distros.

Verification

Testing

  1. Install Fedora 41 (or another distribution that is compatible with a supported distro, yet has a non-matching major version)
  2. Try installing RKE2 without the patch (expected behaviour: failure)
  3. Try installing RKE2 with the patch (expected behaviour: success)

Linked Issues

#7429

User-Facing Change

* VERSION_ID from /etc/os-release can now be overriden using the INSTALL_RKE2_OVERRIDE_OS_VERSION_ID environment variable. This allows for installation on Red Hat-based distros that have a version# that the RKE2 installer does not recognise.

Further Comments

For end-users the alternatives would either be patching /etc/os-release before installation, then restoring the value in /etc/os-release after installation completes, or manually editing install.sh after download.

In addition to trying to guess what version to use for
unknown/unsupported distros, allow the user to override
the VERSION_ID using an environment variable.

This enables installation on some distros belong to the
same families as the ones already supported,
without adding explicit support for those distros.

Signed-off-by: David Weinehall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant