You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command used to invoke ansible:
ansible-playbook ansible/kubespray/remove-node.yml --private-key=assets/ssh/ns2retn -i /tmp/kubespray_inventory.yaml --extra-vars "node=node-0" -v
Output of ansible run:
[redacted as all task ran fine until this one]
...
TASK [remove-node/pre-remove : remove-node | Identify nodes to drain, ignore non-cluster nodes] ****************************************************************************************************************
failed: [master-0 -> 192.168.128.1] (item=node-0) => {"ansible_loop_var": "item", "changed": false, "cmd": "set -o pipefail\n/usr/local/bin/kubectl get nodes -o json | jq .items[].metadata.name | jq \"select(. | test(\\\"^node-0$\\\"))\"\n", "delta": "0:00:00.003542", "end": "2021-03-08 15:07:29.550398", "item": "node-0", "msg": "non-zero return code", "rc": 2, "start": "2021-03-08 15:07:29.546856", "stderr": "/bin/sh: 1: set: Illegal option -o pipefail", "stderr_lines": ["/bin/sh: 1: set: Illegal option -o pipefail"], "stdout": "", "stdout_lines": []}
NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************
PLAY RECAP *****************************************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
master-0 : ok=15 changed=0 unreachable=0 failed=1 skipped=36 rescued=0 ignored=0
Anything else do we need to know:
The command is executed on the master node with Shell (/bin/sh) which is not supporting the "pipefail" option. the Task works if /bin/bash is specified as the executable for "shell" block lie presented below.
Environment:
DigitalOcean droplet 2Gb RAM, 2 vCPU
OS:
ansible --version
):python --version
):Kubespray version (commit) (
git rev-parse --short HEAD
):8ee1b70
Network plugin used:
Calico/Default
Full inventory with variables (
ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"
):Command used to invoke ansible:
ansible-playbook ansible/kubespray/remove-node.yml --private-key=assets/ssh/ns2retn -i /tmp/kubespray_inventory.yaml --extra-vars "node=node-0" -v
Output of ansible run:
Anything else do we need to know:
The command is executed on the master node with Shell (/bin/sh) which is not supporting the "pipefail" option. the Task works if /bin/bash is specified as the executable for "shell" block lie presented below.
In roles/remove-node/pre-remove/tasks/main.yml
So fat I had a problem with this one call to shell only so not making any other suggestion as just to change this particular shell to BASH.
The text was updated successfully, but these errors were encountered: