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

Unexpected SELinux warning when INSTALL_K3S_SKIP_DOWNLOAD=true #8705

Closed
harsimranmaan opened this issue Oct 19, 2023 · 2 comments · Fixed by #8703
Closed

Unexpected SELinux warning when INSTALL_K3S_SKIP_DOWNLOAD=true #8705

harsimranmaan opened this issue Oct 19, 2023 · 2 comments · Fixed by #8703
Assignees
Milestone

Comments

@harsimranmaan
Copy link
Contributor

Environmental Info:
K3s Version:

k3s -v
k3s version v1.28.2+k3s1 (6330a5b)
go version go1.20.8

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

Cluster Configuration:

Single node

Describe the bug:
When k3s is installed with INSTALL_K3S_SKIP_SELINUX_RPM=true or INSTALL_K3S_SKIP_DOWNLOAD=true or INSTALL_K3S_SKIP_DOWNLOAD=selinux, the following message(or similar) is seen on Amazon Linux 2023/Centos

[INFO]  Skipping installation of SELinux RPM
[WARN]  Failed to find the k3s-selinux policy, please install:
    dnf install -y container-selinux
    dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/8/noarch/

[INFO]  Creating /usr/bin/kubectl symlink to k3s

Steps To Reproduce:

  • Disabled SELinux on host
  • Installed K3s:
INSTALL_K3S_SKIP_DOWNLOAD=true INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_SELINUX_WARN==true install.sh

Expected behavior:

The SELinux config steps to be skipped. Expect no warning message

[INFO]  Skipping installation of SELinux RPM

Actual behavior:

[INFO]  Skipping installation of SELinux RPM
[WARN]  Failed to find the k3s-selinux policy, please install:
    dnf install -y container-selinux
    dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/8/noarch/

Additional context / logs:

@dereknola
Copy link
Member

dereknola commented Jan 2, 2024

GH Autoclosed this. No backports because it only affects install script.

@dereknola dereknola reopened this Jan 2, 2024
@VestigeJ VestigeJ self-assigned this Jan 3, 2024
@VestigeJ
Copy link

VestigeJ commented Jan 3, 2024

$ sudo INSTALL_K3S_METHOD=rpm INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_SELINUX_WARN==true ./install-k3s.sh

[INFO]  Finding release for channel stable
[INFO]  Using v1.28.5+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.28.5+k3s1/sha256sum-amd64.txt
[INFO]  Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.28.5+k3s1/k3s
[INFO]  Verifying binary download
[INFO]  Installing k3s to /usr/local/bin/k3s
[INFO]  Skipping installation of SELinux RPM
[INFO]  Creating /usr/local/bin/kubectl symlink to k3s
[INFO]  Creating /usr/local/bin/crictl symlink to k3s
[INFO]  Creating /usr/local/bin/ctr symlink to k3s
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
[INFO]  systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO]  systemd: Starting k3s

@VestigeJ VestigeJ closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done Issue
Development

Successfully merging a pull request may close this issue.

4 participants