Skip to content

Use yum instead of dnf on Amazon Linux 2 #17557

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

Merged
merged 1 commit into from
Aug 23, 2025

Conversation

ConnorJC3
Copy link
Contributor

Amazon Linux 2 only has yum, not dnf in the official AMIs. Thus, the kops-configuration service gets stuck on AL2 trying (and failing) to use dnf instead of yum.

This PR updates HasDNF to always return false for AL2 nodes.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 13, 2025
@hakman
Copy link
Member

hakman commented Aug 14, 2025

Thanks @ConnorJC3, periodic tests indeed fail due to missing dnf:

W0813 18:08:52.913559    2659 executor.go:141] error running task "Package/conntrack-tools" (8m57s remaining to succeed): error installing package "conntrack-tools": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913570    2659 executor.go:141] error running task "Package/logrotate" (8m57s remaining to succeed): error installing package "logrotate": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913576    2659 executor.go:141] error running task "Package/libtool-ltdl" (8m57s remaining to succeed): error installing package "libtool-ltdl": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913584    2659 executor.go:141] error running task "Package/ethtool" (8m57s remaining to succeed): error installing package "ethtool": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913592    2659 executor.go:141] error running task "Package/chrony" (8m57s remaining to succeed): error installing package "chrony": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913597    2659 executor.go:141] error running task "Package/util-linux" (8m57s remaining to succeed): error installing package "util-linux": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913605    2659 executor.go:141] error running task "Package/libcgroup" (8m57s remaining to succeed): error installing package "libcgroup": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913611    2659 executor.go:141] error running task "Package/iptables" (8m57s remaining to succeed): error installing package "iptables": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913616    2659 executor.go:141] error running task "Package/libseccomp" (8m57s remaining to succeed): error installing package "libseccomp": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913624    2659 executor.go:141] error running task "Package/socat" (8m57s remaining to succeed): error installing package "socat": fork/exec /usr/bin/dnf: no such file or directory:
W0813 18:08:52.913631    2659 executor.go:141] error running task "Package/ebtables" (8m57s remaining to succeed): error installing package "ebtables": fork/exec /usr/bin/dnf: no such file or directory:

@hakman
Copy link
Member

hakman commented Aug 14, 2025

/test pull-kops-aws-distro-amazonlinux2
/test pull-kops-e2e-k8s-gce-cilium

@hakman
Copy link
Member

hakman commented Aug 14, 2025

The PR fixes the packages install part, but seems that newer containerd cannot run:

Starting containerd container runtime...
/usr/bin/containerd: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /usr/bin/containerd)
/usr/bin/containerd: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/bin/containerd)
containerd.service: main process exited, code=exited, status=1/FAILURE

@hakman
Copy link
Member

hakman commented Aug 23, 2025

/test pull-kops-aws-distro-amazonlinux2

@hakman
Copy link
Member

hakman commented Aug 23, 2025

Thanks @ConnorJC3, looks like downgrading containerd worked.
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 23, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 23, 2025
@k8s-ci-robot k8s-ci-robot merged commit 91e5ba5 into kubernetes:master Aug 23, 2025
27 checks passed
k8s-ci-robot added a commit that referenced this pull request Aug 23, 2025
…-upstream-release-1.32

Automated cherry pick of #17557: Use yum instead of dnf on Amazon Linux 2
k8s-ci-robot added a commit that referenced this pull request Aug 23, 2025
…-upstream-release-1.33

Automated cherry pick of #17557: Use yum instead of dnf on Amazon Linux 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants