kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
15.94k stars 6.42k forks source link

HTTP proxy not working on Rocky Linux (& likely other OS) after pull/10983 #11301

Open snowmansora opened 3 months ago

snowmansora commented 3 months ago

What happened?

When deploying on Rocky Linux with http_proxy set in an internet restricted environment, dnf install get stuck because /etc/dnf/dnf.conf is not set with proxy.

Before https://github.com/kubernetes-sigs/kubespray/pull/10983, proxy is set in /etc/dnf/dnf.conf by https://github.com/kubernetes-sigs/kubespray/blob/v2.25.0/roles/bootstrap-os/tasks/centos.yml#L7. But that is NOT executed after https://github.com/kubernetes-sigs/kubespray/pull/10983 because os_release_dict['ID'] is rocky, but there isn't a roles/bootstrap-os/tasks/rocky.yml, hence https://github.com/kubernetes-sigs/kubespray/blob/v2.25.0/roles/bootstrap-os/tasks/main.yml#L22 does not include bootstrap-os task for Rocky Linux.

Symbolic link roles/bootstrap-os/tasks/rocky.yml to roles/bootstrap-os/tasks/centos.yml fixes the issue.

Please note that other operating systems are also likely affected as the changes in https://github.com/kubernetes-sigs/kubespray/pull/10983 are not "backward compatible":

What did you expect to happen?

/etc/dnf/dnf.conf is set with proxy on Rocky Linux.

How can we reproduce it (as minimally and precisely as possible)?

Deploy on Rocky Linux with http_proxy set.

OS

Rocky Linux 8.9

Version of Ansible

ansible==9.5.1 ansible-core==2.16.7

Version of Python

3.12

Version of Kubespray (commit)

v2.25.0

Network plugin used

flannel

Full inventory with variables

-

Command used to invoke ansible

-

Output of ansible run

-

Anything else we need to know

No response

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale