Skip to content

k3sup not working on fcos with testing channel #407

@adrecord

Description

@adrecord

I use k3sup to setup a k3s cluster on fcos nodes for personal cluster (libvirt vms). This used to work. Per this issue the stable channel doesn't have some rpms, but using the testing channel works. I verified that manually ssh'ing to the fcos node and running curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=testing sh - does work, as suggested in this comment. However, the equivalent version of this, to pass --k3s-channel testing to k3sup, does not work.

Expected Behaviour

I'm expecting k3sup installs k3s successfully.

Current Behaviour

$ ./k3sup install --host coreos01.adr.net --user root --k3s-channel testing --ssh-key ~/.ssh/id_ecdsa
Running: k3sup install
2023/05/30 00:26:20 coreos01.adr.net
Public IP: coreos01.adr.net
[INFO]  Finding release for channel testing
[INFO]  Using v1.27.2-rc3+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.27.2-rc3+k3s1/sha256sum-amd64.txt
[INFO]  Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.27.2-rc3+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-testing 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-testing'...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: 2018-02-20T19:18:14Z solvables: 0
rpm-md repo 'updates'; generated: 2023-05-30T01:55:50Z solvables: 13522
rpm-md repo 'fedora'; generated: 2023-04-13T20:37:10Z solvables: 69222
rpm-md repo 'rancher-k3s-common-testing'; generated: 2023-05-25T20:15:06Z solvables: 8
rpm-md repo 'updates-archive'; generated: 2023-05-30T02:11:55Z solvables: 13778
Resolving dependencies...done
Will download: 1 package (21.2 kB)
Downloading from 'rancher-k3s-common-testing'...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.3-10.coreos.noarch
Changes queued for next boot. Run "systemctl reboot" to start a reboot
[WARN]  Failed to find the k3s-selinux policy, please install:
    rpm-ostree install -y container-selinux
    rpm-ostree install -y https://rpm-testing.rancher.io/k3s/testing/common/coreos/noarch/

[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.
Result: [INFO]  Finding release for channel testing
[INFO]  Using v1.27.2-rc3+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.27.2-rc3+k3s1/sha256sum-amd64.txt
[INFO]  Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.27.2-rc3+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-testing 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-testing'...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: 2018-02-20T19:18:14Z solvables: 0
rpm-md repo 'updates'; generated: 2023-05-30T01:55:50Z solvables: 13522
rpm-md repo 'fedora'; generated: 2023-04-13T20:37:10Z solvables: 69222
rpm-md repo 'rancher-k3s-common-testing'; generated: 2023-05-25T20:15:06Z solvables: 8
rpm-md repo 'updates-archive'; generated: 2023-05-30T02:11:55Z solvables: 13778
Resolving dependencies...done
Will download: 1 package (21.2 kB)
Downloading from 'rancher-k3s-common-testing'...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.3-10.coreos.noarch
Changes queued for next boot. Run "systemctl reboot" to start a reboot
[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
 [WARN]  Failed to find the k3s-selinux policy, please install:
    rpm-ostree install -y container-selinux
    rpm-ostree install -y https://rpm-testing.rancher.io/k3s/testing/common/coreos/noarch/

Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.

Error: error received processing command: Process exited with status 1

Possible Solution

not sure

Steps to Reproduce

  1. install fcos on a node
  2. run ./k3sup install --host coreos01.adr.net --user root --k3s-channel testing --ssh-key ~/.ssh/id_ecdsa

Your Environment

  • k3sup version:
Version: 0.12.12
Git Commit: 02c7a775b9914b9dcf3b90fa7935eb347b7979e7
  • What OS or type or VM are you using for your cluster? Where is it hosted? (for k3sup install/join):

FCOS

[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'

Do you want to work on this?

Subject to design approval, are you willing to work on a Pull Request for this issue or feature request?

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions