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

install.sh on fedora coreos tries to use yum instead of rpm-ostree #7666

Closed
adrecord opened this issue Jun 2, 2023 · 4 comments
Closed

install.sh on fedora coreos tries to use yum instead of rpm-ostree #7666

adrecord opened this issue Jun 2, 2023 · 4 comments
Assignees
Milestone

Comments

@adrecord
Copy link
Contributor

adrecord commented Jun 2, 2023

Environmental Info:

K3s Version: k3s not yet installed. Problem with recent install.sh

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

[root@coreos01 ~]# uname -a
Linux coreos01 6.2.13-300.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 27 01:33:30 UTC 2023 x86_64 GNU/Linux

[root@coreos01 ~]# cat /etc/os-release 
NAME="Fedora Linux"
VERSION="38.20230430.3.1 (CoreOS)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora CoreOS 38.20230430.3.1"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='38.20230430.3.1'

Cluster Configuration:
n/a

Describe the bug:
running install.sh results in error line 628: yum: command not found. This is fedora coreos, so it should be using rpm-ostree.

Steps To Reproduce:

  1. setup fedora coreos as indicated by /etc/os-release above
  2. curl -sfL https://get.k3s.io | sh -

Expected behavior:
k3s to install successfully

Actual behavior:
errors with yum: command not found as shown here:

[root@coreos01 ~]# curl -sfL https://get.k3s.io | sh -
[INFO]  Finding release for channel stable
[INFO]  Using v1.26.5+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.26.5+k3s1/sha256sum-amd64.txt
[INFO]  Skipping binary downloaded, installed k3s matches hash
[INFO]  Finding available k3s-selinux versions
main: line 628: yum: command not found

Additional context / logs:

@brandond
Copy link
Member

brandond commented Jun 2, 2023

I guess we need to move the coreos check at

k3s/install.sh

Line 525 in fa0dc59

elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then
up higher in the list. It's matching it as a fedora version before matching it as coreos.

PR welcome!

@adrecord
Copy link
Contributor Author

adrecord commented Jun 2, 2023

PR submitted.. can't get it to link to this issue cause I didn't include the magic words in the commit msg.

@brandond
Copy link
Member

brandond commented Jun 5, 2023

We actually prefer that the issues not be linked for auto-closing.

@brandond brandond moved this from New to To Test in K3s Development Jun 5, 2023
@brandond brandond added this to the v1.27.3+k3s1 milestone Jun 5, 2023
@ShylajaDevadiga
Copy link
Contributor

Validated on fedora coreos

$ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="38.20230430.3.1 (CoreOS)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora CoreOS 38.20230430.3.1"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='38.20230430.3.1'

$ curl -sfL https://get.k3s.io | sh -
[INFO]  Finding release for channel stable
[INFO]  Using v1.26.5+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.26.5+k3s1/sha256sum-amd64.txt
[INFO]  Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.26.5+k3s1/k3s
[INFO]  Verifying binary download
[INFO]  Installing k3s to /usr/local/bin/k3s
[INFO]  Finding available k3s-selinux versions
Checking out tree e7109be... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora rancher-k3s-common-stable updates-archive
Updating metadata for 'fedora-cisco-openh264'... done
Updating metadata for 'fedora-modular'... done
Updating metadata for 'updates-modular'... done
Updating metadata for 'updates'... done
Updating metadata for 'fedora'... done
Updating metadata for 'rancher-k3s-common-stable'... done
Updating metadata for 'updates-archive'... done
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2023-03-14T10:56:46Z solvables: 4
rpm-md repo 'fedora-modular'; generated: 2023-04-13T20:30:47Z solvables: 1082
rpm-md repo 'updates-modular'; generated: 2023-06-03T03:15:48Z solvables: 1074
rpm-md repo 'updates'; generated: 2023-06-09T01:52:13Z solvables: 15335
rpm-md repo 'fedora'; generated: 2023-04-13T20:37:10Z solvables: 69222
rpm-md repo 'rancher-k3s-common-stable'; generated: 2023-06-02T16:56:56Z solvables: 2
rpm-md repo 'updates-archive'; generated: 2023-06-09T02:20:05Z solvables: 16484
Resolving dependencies... done
Will download: 1 package (21.2 kB)
Downloading from 'rancher-k3s-common-stable'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 2.1 MB (pkgcache branches: 0)
Added:
  k3s-selinux-1.4-1.coreos.noarch
Changes queued for next boot. Run "systemctl reboot" to start a reboot
[WARN]  Please reboot your machine to activate the changes and avoid data loss.
[INFO]  Creating /usr/local/bin/kubectl symlink to k3s
[INFO]  Creating /usr/local/bin/crictl symlink to k3s
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, command exists in PATH at /usr/bin/ctr
[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.

$ kubectl get nodes
NAME               STATUS   ROLES                  AGE     VERSION
ip-172-31-21-194   Ready    control-plane,master   3m28s   v1.26.5+k3s1

$ kubectl get pods -A
NAMESPACE     NAME                                      READY   STATUS      RESTARTS   AGE
kube-system   local-path-provisioner-76d776f6f9-w872k   1/1     Running     0          3m12s
kube-system   coredns-59b4f5bbd5-z5wvj                  1/1     Running     0          3m12s
kube-system   metrics-server-7b67f64457-6kmnf           1/1     Running     0          3m12s
kube-system   helm-install-traefik-crd-55z9x            0/1     Completed   0          3m13s
kube-system   helm-install-traefik-kckt8                0/1     Completed   2          3m13s
kube-system   svclb-traefik-3d9ee87f-rhs4q              2/2     Running     0          2m23s
kube-system   traefik-57c84cf78d-4tfm9                  1/1     Running     0          2m23s

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

3 participants