Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove-node.yml exits unexpectedly with error: 'docker_bin_dir' is undefined #2702

Closed
minhdanh opened this issue Apr 24, 2018 · 2 comments
Closed

Comments

@minhdanh
Copy link

minhdanh commented Apr 24, 2018

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Environment:

  • Cloud provider or hardware configuration: Digital Ocean

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Version of Ansible (ansible --version): 2.5.0

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

Network plugin used: calico

Copy of your inventory file:

master1 ansible_host=x.x.x.x ip=10.130.83.129 ansible_user=root
master2 ansible_host=x.x.x.x ip=10.130.83.127 ansible_user=root
master3 ansible_host=x.x.x.x ip=10.130.83.128 ansible_user=root
etcd1 ansible_host=x.x.x.x ip=10.130.83.29 ansible_user=root
etcd2 ansible_host=x.x.x.x ip=10.130.83.30 ansible_user=root
etcd3 ansible_host=x.x.x.x ip=10.130.83.32 ansible_user=root
node1 ansible_host=x.x.x.x ip=10.130.83.136 ansible_user=root
node2 ansible_host=x.x.x.x ip=10.130.83.137 ansible_user=root
node3 ansible_host=x.x.x.x ip=10.130.83.133 ansible_user=root
node4 ansible_host=x.x.x.x ip=10.130.85.33 ansible_user=root

# ## configure a bastion host if your nodes are not directly reachable
# bastion ansible_host=x.x.x.x ansible_user=some_user

[kube-master]
master1
master2
master3

[etcd]
etcd1
etcd2
etcd3

[kube-node]
node4

# [kube-ingress]
# node2
# node3

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

Command used to invoke ansible: ansible-playbook -v -i inventory/mycluster/hosts.ini remove-node.yml

Output of ansible run: https://gist.github.com/minhdanh/c4c1fd44b69e80cafee4412956148ffc

Anything else do we need to know:
The ansible-playbook command to run remove-node.yml ends up with error: 'docker_bin_dir' is undefined

@riverzhang
Copy link
Contributor

riverzhang commented Apr 25, 2018

'docker_bin_dir' is undefined? The log 'bin_dir' is undefined.

@minhdanh
Copy link
Author

Oh, those errors were being ignored, as you can see:

fatal: [master1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'bin_dir' is undefined\n\nThe error appears to have been in 'kubespray/roles/remove-node/pre-remove/tasks/main.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: remove-node | Drain node except daemonsets resource\n  ^ here\n"}
...ignoring

The error that caused ansible-playbook to exit was:

TASK [reset : reset | remove all containers] ********************************************************
Tuesday 24 April 2018  17:10:09 +0700 (0:00:00.043)       0:00:14.365 *********
fatal: [node4]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'docker_bin_dir' is undefined\n\nThe error appears to have been in 'kubespray/roles/reset/tasks/main.yml': line 46, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: reset | remove all containers\n  ^ here\n"}
        to retry, use: --limit @kubespray/remove-node.retry

qbl added a commit to qbl/kubespray that referenced this issue May 10, 2018
qbl added a commit to qbl/kubespray that referenced this issue May 14, 2018
riverzhang added a commit that referenced this issue May 14, 2018
Fix issue #2702: 'docker_bin_dir' is undefined when running ansible-playbook remove-node.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants