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

Installation of k3s fails on Tumbleweed #6790

Closed
grisu48 opened this issue Jan 20, 2023 · 3 comments
Closed

Installation of k3s fails on Tumbleweed #6790

grisu48 opened this issue Jan 20, 2023 · 3 comments
Assignees
Milestone

Comments

@grisu48
Copy link
Contributor

grisu48 commented Jan 20, 2023

Environmental Info:
K3s Version: v1.25.5+k3s2

Node(s) CPU architecture, OS, and Version:

Linux tumbleweed 6.1.6-1-default #1 SMP PREEMPT_DYNAMIC Mon Jan 16 05:11:14 UTC 2023 (573f4a9) x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration: None

Describe the bug:

Installation of k3s via the get.k3s.io script fails on openSUSE Tumbleweed:

tumbleweed:~ # curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true sh -s -
[INFO]  Finding release for channel stable
[INFO]  Using v1.25.5+k3s2 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.25.5+k3s2/sha256sum-amd64.txt
[INFO]  Skipping binary downloaded, installed k3s matches hash
[ERROR]  Failed to find the k3s-selinux policy, please install:
    yum install -y container-selinux
    yum install -y https://rpm.rancher.io/k3s/stable/common/centos/8/noarch/k3s-selinux-1.2-2.el8.noarch.rpm

This is on a system with SELinux installed and set to ENFORCE. Changing SELinux to permissive doesn't change the outcome.

Steps To Reproduce:

  • # curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_START=true sh -s -

Installed K3s: -

Expected behavior:

  • k3s gets installed

Actual behavior:

  • Installer terminates with an error

Additional context / logs:

@grisu48
Copy link
Contributor Author

grisu48 commented Jan 20, 2023

The issue might be located in https://github.com/k3s-io/k3s/blob/master/install.sh#L469, where the detection of the SUSE Distribution fails and we end up in the EL8 branch (credits to @Vogtinator for the discovery)

@Vogtinator
Copy link

Yes,

k3s/install.sh

Line 469 in f10af36

if [ "${ID_LIKE%%[ ]*}" = "suse" ]; then
is broken, that only works if suse is the first entry, but it's not.

@VestigeJ
Copy link

VestigeJ commented Feb 8, 2023

I just tried reproducing this with a reverted copy of the install.sh script but the install worked correctly - that being said the new install.sh seems to work correctly as well.

previous install.sh os-release check

Screenshot 2023-02-08 at 1 13 19 PM

latest install.sh

Screenshot 2023-02-08 at 1 15 54 PM

@VestigeJ VestigeJ closed this as completed Feb 8, 2023
@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants