kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.21k stars 6.49k forks source link

ansible calicoctl.sh error.... #11399

Open Nurlan199206 opened 4 months ago

Nurlan199206 commented 4 months ago

What happened?

fatal: [node1]: FAILED! => {"changed": false, "cmd": ["/usr/local/bin/calicoctl.sh", "apply", "-f", "-"], "delta": "0:00:00.320837", "end": "2024-07-26 10:54:50.000224", "msg": "non-zero return code", "rc": 1, "start": "2024-07-26 10:54:49.679387", "stderr": "Failed to apply 'FelixConfiguration' resource: [Post \"https://k8s-lb:6443/apis/crd.projectcalico.org/v1/felixconfigurations\": unexpected EOF]", "stderr_lines": ["Failed to apply 'FelixConfiguration' resource: [Post \"https://k8s-lb:6443/apis/crd.projectcalico.org/v1/felixconfigurations\": unexpected EOF]"], "stdout": "", "stdout_lines": []}

What did you expect to happen?

installed cluster

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

3 master node, 2 worker nodes

OS

Ubuntu 22.04

Version of Ansible

2.16.9

Version of Python

3.10.12

Version of Kubespray (commit)

2d194af85

Network plugin used

calico

Full inventory with variables

k8s-master01 | SUCCESS => {
    "hostvars[node01]": "VARIABLE IS NOT DEFINED!"
}
k8s-master02 | SUCCESS => {
    "hostvars[node01]": "VARIABLE IS NOT DEFINED!"
}
k8s-master03 | SUCCESS => {
    "hostvars[node01]": "VARIABLE IS NOT DEFINED!"
}
k8s-node02 | SUCCESS => {
    "hostvars[node01]": "VARIABLE IS NOT DEFINED!"
}
k8s-node01 | SUCCESS => {
    "hostvars[node01]": "VARIABLE IS NOT DEFINED!"
}

Command used to invoke ansible

ansible-playbook -i /home/nurlan/kubespray/inventory/mycluster/hosts.yaml -bkK -u nurlan --become-user=root cluster.yml

Output of ansible run

TASK [network_plugin/calico : Calico | Configure calico FelixConfiguration] ***************************************************************************************************
fatal: [node1]: FAILED! => {"changed": false, "cmd": ["/usr/local/bin/calicoctl.sh", "apply", "-f", "-"], "delta": "0:00:00.320837", "end": "2024-07-26 10:54:50.000224", "msg": "non-zero return code", "rc": 1, "start": "2024-07-26 10:54:49.679387", "stderr": "Failed to apply 'FelixConfiguration' resource: [Post \"https://k8s-lb:6443/apis/crd.projectcalico.org/v1/felixconfigurations\": unexpected EOF]", "stderr_lines": ["Failed to apply 'FelixConfiguration' resource: [Post \"https://k8s-lb:6443/apis/crd.projectcalico.org/v1/felixconfigurations\": unexpected EOF]"], "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT ************************************************************************************************************************************************************

PLAY RECAP ********************************************************************************************************************************************************************
node1                      : ok=556  changed=91   unreachable=0    failed=1    skipped=672  rescued=0    ignored=4
node2                      : ok=504  changed=87   unreachable=0    failed=0    skipped=577  rescued=0    ignored=3
node3                      : ok=425  changed=69   unreachable=0    failed=0    skipped=497  rescued=0    ignored=2
node4                      : ok=359  changed=49   unreachable=0    failed=0    skipped=467  rescued=0    ignored=1
node5                      : ok=359  changed=49   unreachable=0    failed=0    skipped=467  rescued=0    ignored=1

Friday 26 July 2024  10:54:50 +0000 (0:00:00.428)       0:12:07.000 ***********
===============================================================================
kubernetes/control-plane : Kubeadm | Initialize first master ---------------------------------------------------------------------------------------------------------- 55.81s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------ 54.49s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------ 50.49s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------ 47.53s
kubernetes/control-plane : Joining control plane node to the cluster. ------------------------------------------------------------------------------------------------- 46.97s
etcd : Reload etcd ---------------------------------------------------------------------------------------------------------------------------------------------------- 31.24s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------ 30.87s
kubernetes/kubeadm : Join to cluster ---------------------------------------------------------------------------------------------------------------------------------- 19.13s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------ 16.18s
kubernetes/node : Install | Copy kubelet binary from download dir ----------------------------------------------------------------------------------------------------- 15.58s
bootstrap-os : Gather facts ------------------------------------------------------------------------------------------------------------------------------------------- 15.48s
bootstrap-os : Assign inventory name to unconfigured hostnames (non-CoreOS, non-Flatcar, Suse and ClearLinux, non-Fedora) --------------------------------------------- 10.64s
kubernetes/preinstall : Check status of /etc/resolv.conf -------------------------------------------------------------------------------------------------------------- 10.11s
bootstrap-os : Check http::proxy in apt configuration files ----------------------------------------------------------------------------------------------------------- 10.10s
network_plugin/calico : Calico | Copy calicoctl binary from download dir ----------------------------------------------------------------------------------------------- 9.11s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------- 8.69s
download : Download_container | Download image if required ------------------------------------------------------------------------------------------------------------- 7.64s
etcd : Configure | Check if etcd cluster is healthy -------------------------------------------------------------------------------------------------------------------- 6.47s
kubernetes/preinstall : Create kubernetes directories ------------------------------------------------------------------------------------------------------------------ 5.51s
bootstrap-os : Ensure bash_completion.d folder exists ------------------------------------------------------------------------------------------------------------------ 5.47s

Anything else we need to know

No response

k8s-triage-robot commented 1 month 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

k8s-triage-robot commented 3 days ago

The Kubernetes project currently lacks enough active 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 rotten