Environment:
VM running on KVM
8 vcpu and 32GB Memory
printf "$(uname -srm)\n$(cat /etc/os-release)\n"):Linux 3.10.0-1160.6.1.el7.x86_64 x86_64
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
ansible --version):ansible 2.9.6
config file = /root/kubespray/ansible.cfg
configured module search path = [u'/root/kubespray/library']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
python3 --version):Python 3.6.8
Kubespray version (commit) (git rev-parse --short HEAD):
68b96bd
Network plugin used:
cni
Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):
https://gist.github.com/ovaleanujnpr/f80d9b4ffac8a29ddef4fa042c66b76a
Command used to invoke ansible:
ansible-playbook -i inventory/my-cluster/hosts.yml cluster.yml
Output of ansible run:
https://gist.github.com/ovaleanujnpr/3c15ad4df6c4a68d527debc12b12cacd
Anything else do we need to know:
The playbook is failing copying etcdctl using the docker command, but there is not docker binary because the container runtime is crio.
TASK [etcd : Install | Copy etcdctl binary from docker container] **************************************************************************************************************************************************************************************************************************************
fatal: [k8s-m1.local]: FAILED! => {"attempts": 4, "changed": false, "cmd": ["sh", "-c", "/usr/bin/docker rm -f etcdctl-binarycopy; /usr/bin/docker create --name etcdctl-binarycopy quay.io/coreos/etcd:v3.4.13 && /usr/bin/docker cp etcdctl-binarycopy:/usr/local/bin/etcdctl /usr/local/bin/etcdctl && /usr/bin/docker rm -f etcdctl-binarycopy"], "delta": "0:00:00.009213", "end": "2020-12-02 08:48:05.695073", "msg": "non-zero return code", "rc": 127, "start": "2020-12-02 08:48:05.685860", "stderr": "sh: /usr/bin/docker: No such file or directory\nsh: /usr/bin/docker: No such file or directory", "stderr_lines": ["sh: /usr/bin/docker: No such file or directory", "sh: /usr/bin/docker: No such file or directory"], "stdout": "", "stdout_lines": []}
The playbook responsible is this
[root@k8s-m1 kubespray]# cat ./roles/etcd/tasks/install_etcdctl_docker.yml
---
- name: Install | Copy etcdctl binary from docker container
command: sh -c "{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy;
{{ docker_bin_dir }}/docker create --name etcdctl-binarycopy {{ etcd_image_repo }}:{{ etcd_image_tag }} &&
{{ docker_bin_dir }}/docker cp etcdctl-binarycopy:/usr/local/bin/etcdctl {{ bin_dir }}/etcdctl &&
{{ docker_bin_dir }}/docker rm -f etcdctl-binarycopy"
register: etcdctl_install_result
until: etcdctl_install_result.rc == 0
retries: "{{ etcd_retries }}"
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
What is happening if I am using crio or containerd and docker is not installed?
seen in your inventory:
"etcd_deployment_type": "docker",
according https://github.com/kubernetes-sigs/kubespray/blob/master/docs/cri-o.md
you need to configure it as host
etcd_deployment_type: host
Right! Thank you!
/close
@floryut: Closing this issue.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Most helpful comment
seen in your inventory:
according https://github.com/kubernetes-sigs/kubespray/blob/master/docs/cri-o.md
you need to configure it as host