Kubespray: docker_version parameter is mandatory

Created on 17 Dec 2018  路  5Comments  路  Source: kubernetes-sigs/kubespray

/kind bug

Environment:

  • Cloud provider or hardware configuration:
    baremetal
  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
Linux 3.10.0-862.14.4.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"
  • Version of Ansible (ansible --version):
ansible 2.5.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/florent_monbillard/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Kubespray version (commit) (git rev-parse --short HEAD):

4a7f829

Network plugin used:

flannel

Copy of your inventory file:

kube-master     ansible_host=10.x.x.100 ip=10.x.x.100
kube-node-1     ansible_host=10.x.x.110 ip=10.x.x.110
kube-node-2     ansible_host=10.x.x.111 ip=10.x.x.111
kube-node-3     ansible_host=10.x.x.112 ip=10.x.x.112

[kube-master]
kube-master

[etcd]
kube-node-1
kube-node-2
kube-node-3

[kube-node]
kube-node-1
kube-node-2
kube-node-3

[k8s-cluster:children]
kube-master
kube-node

[calico-rr]

[vault]
kube-node-1
kube-node-2
kube-node-3

Command used to invoke ansible:

ansible-playbook -b -i inventory/lab/hosts.ini -v cluster.yml

Output of ansible run:

TASK [kubernetes/preinstall : Hosts | populate inventory into hosts file] 
*********************************************
Monday 17 December 2018  10:28:23 -0800 (0:00:00.573)       0:02:09.296 *******
fatal: [kube-master]: FAILED! => {"msg": "Version comparison: 'docker_version' is undefined"}
fatal: [kube-node-1]: FAILED! => {"msg": "Version comparison: 'docker_version' is undefined"}
fatal: [kube-node-2]: FAILED! => {"msg": "Version comparison: 'docker_version' is undefined"}
fatal: [kube-node-3]: FAILED! => {"msg": "Version comparison: 'docker_version' is undefined"}

Anything else do we need to know:

Running kubespray using -e docker_version='18.06' fixes the issue. kubespray should use default value in roles/container-engine/docker/defaults/main.yml if not explicitely defined.

kinbug

Most helpful comment

FYI I still had this issue today while trying to install the tagged version v2.8.1

All 5 comments

docker_version has already set in this commit 4a7f829e/roles/container-engine/docker/defaults/main.yml

I am experiencing the same problem with the latest code.

Solution:

cat inventory/cluster/group_vars/all/docker.yml
...

# define docker version
docker_version: '17.03'

...

docker_version has already set in this commit 4a7f829e/roles/container-engine/docker/defaults/main.yml

Indeed, that should be enough, but currently, it doesn't work. @wenhuwang's solution is a viable workaround, along with using the -e parameter in CLI like I mentioned.

FYI I still had this issue today while trying to install the tagged version v2.8.1

No longer happening in master branch

Was this page helpful?
0 / 5 - 0 ratings