Need "ip" utlity check in Kubespray Project #11679
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened?
Kubespray fails during deployment if the ip utility from the iproute2 package is missing on any node. This causes the [kubespray-defaults : Create fallback_ips_base] role to encounter a fatal error, stopping the deployment process.
What did you expect to happen?
I expected Kubespray to first check for the presence of the iproute2 package before executing any tasks that depend on it. If the package is missing, Kubespray should automatically install it to prevent errors during the deployment process.
How can we reproduce it (as minimally and precisely as possible)?
Set up an inventory for a Kubespray deployment where some nodes lack the iproute2 package.
Run the Kubespray playbook targeting this inventory.
Observe that the deployment will fail with a fatal error during the [kubespray-defaults : Create fallback_ips_base] role due to the missing ip utility on worker nodes.
OS
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
Version of Ansible
ansible [core 2.16.12]
config file = /home/aslan/kubespray-venv/kubespray/ansible.cfg
configured module search path = ['/home/aslan/kubespray-venv/kubespray/library']
ansible python module location = /home/aslan/kubespray-venv/venv/lib/python3.12/site-packages/ansible
ansible collection location = /home/aslan/.ansible/collections:/usr/share/ansible/collections
executable location = /home/aslan/kubespray-venv/venv/bin/ansible
python version = 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] (/home/aslan/kubespray-venv/venv/bin/python3.12)
jinja version = 3.1.4
libyaml = True
Version of Python
Python 3.12.3
Version of Kubespray (commit)
f9ebd45
Network plugin used
calico
Full inventory with variables
https://gist.github.com/a7lan/0da098dc33cee26eac893a694e50afa9
Command used to invoke ansible
ansible-playbook playbooks/upgrade_cluster.yml -i inventory/dev/inventory.ini -b -e kube_version=v1.29.9 --limit worker01
Output of ansible run
https://gist.github.com/a7lan/69ff01801613e4a1b9b7a2f3c14fed5f
Anything else we need to know
No response
The text was updated successfully, but these errors were encountered: