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

Can't Install RKE2 on ARM64 Architecture #6926

Open
ccravens opened this issue Oct 3, 2024 · 3 comments
Open

Can't Install RKE2 on ARM64 Architecture #6926

ccravens opened this issue Oct 3, 2024 · 3 comments
Assignees
Labels
waiting-for-RC Issue is available to test only after we have an RC

Comments

@ccravens
Copy link
Contributor

ccravens commented Oct 3, 2024

Environmental Info:
RKE2 Version:
v1.28.3~rke2r1

Node(s) CPU architecture, OS, and Version:
Rocky 8.10 aarch64

Cluster Configuration:
3 masters 6 workers

Describe the bug:
I'm running the following command as root:

curl -sfL https://get.rke2.io/ | INSTALL_RKE2_TYPE="server" INSTALL_RKE2_VERSION="v1.28.3+rke2r1" sh -

However I get the following error:

[INFO]  using 1.28 series from channel stable
Rancher RKE2 Common (stable)                     21 kB/s | 2.9 kB     00:00    
Rancher RKE2 1.28 (stable)                       23 kB/s | 2.9 kB     00:00    
Error: 
 Problem: conflicting requests
  - package rke2-server-1.28.3~rke2r1-0.el8.x86_64 from rancher-rke2-1.28-stable does not have a compatible architecture
  - nothing provides rke2-common = 1.28.3~rke2r1-0.el8 needed by rke2-server-1.28.3~rke2r1-0.el8.x86_64 from rancher-rke2-1.28-stable
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Even though in the https://get.rke2.io/ script, I see this:

# setup_arch set arch and suffix,
# fatal if architecture not supported.
setup_arch() {
    case ${ARCH:=$(uname -m)} in
    x86_64|amd64)
        ARCH=amd64
        SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
        ;;
    aarch64|arm64)
        ARCH=arm64
        SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
        ;;
    s390x)
        ARCH=s390x
        SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
        ;;
    *)
        fatal "unsupported architecture ${ARCH}"
        ;;
    esac
}

Which returns the correct value of aarch64:

[root@localhost ~]# uname -m
aarch64

Why is it pulling x86_64 packages when installing on an aarch64 architecture?

Steps To Reproduce:
Run the following on an ARM64 build of Rocky 8.10:

curl -sfL https://get.rke2.io/ | INSTALL_RKE2_TYPE="server" INSTALL_RKE2_VERSION="v1.28.3+rke2r1" sh -

Expected behavior:
RKE2 installer uses the correct repo for aarch64

Actual behavior:
RKE2 installer uses the incorrect repo x86_64

Additional context / logs:
None

@ccravens
Copy link
Contributor Author

ccravens commented Oct 3, 2024

ok I think I found the issue, in the install script at https://get.rke2.io/, x86_64 is hardcoded when creating the repo entry:

    cat <<-EOF >"${repodir}/rancher-rke2.repo"
[rancher-rke2-common-${rke2_rpm_channel}]
name=Rancher RKE2 Common (${1})
baseurl=https://${rpm_site}/rke2/${rke2_rpm_channel}/common/${rpm_site_infix}/noarch
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://${rpm_site}/public.key
EOF

    if [ -z "${INSTALL_RKE2_COMMIT}" ]; then
    cat <<-EOF >>"${repodir}/rancher-rke2.repo"
[rancher-rke2-${rke2_majmin}-${rke2_rpm_channel}]
name=Rancher RKE2 ${rke2_majmin} (${1})
baseurl=https://${rpm_site}/rke2/${rke2_rpm_channel}/${rke2_majmin}/${rpm_site_infix}/x86_64 ### Hardcoded
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://${rpm_site}/public.key
EOF

And I confirmed this when cat'ing out the repo entry:

[root@localhost ~]# uname -m
aarch64
[root@localhost ~]# cat /etc/yum.repos.d/rancher-rke2.repo 
[rancher-rke2-common-stable]
name=Rancher RKE2 Common (stable)
baseurl=https://rpm.rancher.io/rke2/stable/common/centos/8/noarch
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://rpm.rancher.io/public.key
[rancher-rke2-1.28-stable]
name=Rancher RKE2 1.28 (stable)
baseurl=https://rpm.rancher.io/rke2/stable/1.28/centos/8/x86_64. ## x86_84
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://rpm.rancher.io/public.key
[root@localhost ~]#

@cwayne18
Copy link
Member

cwayne18 commented Oct 3, 2024

Also I'm not sure we had RPMs built for 1.28.3, why are you specifically using such an old version?

@brandond
Copy link
Member

brandond commented Oct 3, 2024

We just started providing RPMs for arm64 with last month's releases, but this was already pointed out on Slack.

@brandond brandond self-assigned this Oct 3, 2024
@brandond brandond added this to the 2024-10 Release Cycle milestone Oct 3, 2024
@aganesh-suse aganesh-suse self-assigned this Oct 4, 2024
@aganesh-suse aganesh-suse added the waiting-for-RC Issue is available to test only after we have an RC label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-RC Issue is available to test only after we have an RC
Projects
None yet
Development

No branches or pull requests

4 participants