Skip to content

Missing kubespray_cache directory when running with download_run_once: true #12274

Open
@kyrbrbik

Description

@kyrbrbik

What happened?

When running upgrade-cluster.yml with env vars download_run_once: true and download_localhost: false the /tmp/kubespray_cache/ directory isn't created so the playbook fails on task Download_container | Copy image to ansible host cache.

What did you expect to happen?

Create cache directory

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

Run upgrade-cluster.yml or cluster.yml with same env vars as listed below with ansible control node not being on the kubernetes node that will be chosen as download_delegate.

OS

Debian 12

Version of Ansible

ansible [core 2.16.14]
  config file = /home/brbik/github/infra/kubernetes/kubespray/ansible.cfg
  configured module search path = ['/home/brbik/github/infra/kubernetes/kubespray/library']
  ansible python module location = /home/brbik/github/infra/kubernetes/kubespray/venv/lib/python3.13/site-packages/ansible
  ansible collection location = /home/brbik/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/brbik/github/infra/kubernetes/kubespray/venv/bin/ansible
  python version = 3.13.3 (main, Apr  9 2025, 07:44:25) [GCC 14.2.1 20250207] (/home/brbik/github/infra/kubernetes/kubespray/venv/bin/python3)
  jinja version = 3.1.6
  libyaml = True

Version of Python

Python 3.13.3

Version of Kubespray (commit)

63cdf87

Network plugin used

calico

Full inventory with variables

[all]
kube-master-dev-1 ansible_host=192.168.0.156
kube-master-dev-2 ansible_host=192.168.0.158
kube-master-dev-3 ansible_host=192.168.0.157
kube-worker-dev-1 ansible_host=192.168.0.155
kube-worker-dev-2 ansible_host=192.168.0.154
kube-worker-dev-3 ansible_host=192.168.0.153


[kube_control_plane]
kube-master-dev-1
kube-master-dev-2
kube-master-dev-3

[etcd]
kube-master-dev-1
kube-master-dev-2
kube-master-dev-3

[kube_node]
kube-worker-dev-1
kube-worker-dev-2
kube-worker-dev-3

[k8s_cluster:children]
kube_control_plane
kube_node

Command used to invoke ansible

ansible-playbook -i inventory.ini -u root upgrade-cluster.yml -e download_run_once=True download_localhost=False

Output of ansible run

TASK [download : Download_container | Copy image to ansible host cache] ***************************************************************************************************************************************************************************************
fatal: [kube-master-dev-1]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null' --out-format='<<CHANGED>>%i %n%L' [email protected]:/tmp/releases/images/quay.io_calico_node_v3.29.3.tar /tmp/kubespray_cache/images/quay.io_calico_node_v3.29.3.tar", "msg": "Warning: Permanently added '192.168.0.156' (ED25519) to the list of known hosts.\r\nrsync: [Receiver] change_dir#3 \"/tmp/kubespray_cache/images\" failed: No such file or directory (2)\nrsync error: errors selecting input/output files, dirs (code 3) at main.c(829) [Receiver=3.2.7]\nrsync: [Receiver] write error: Broken pipe (32)\n", "rc": 3}

Anything else we need to know

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Debian 12kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions