calico: use absolute path to docker, crictl binary (#6253)
To avoid the following error (ignored when pipefail is off) RUNNING HANDLER [network_plugin/calico : containerd | delete calico-node containers] ******************************************************************************* changed: [node1] => {"attempts": 1, "changed": true, "cmd": "crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c \"crictl stopp % && crictl rmp %\"", "delta": "0:00:00.004240", "end": "2020-06-10 03:32:41.316955", "rc": 0, "start": "2020-06-10 03:32:41.312715", "stderr": "/bin/sh: crictl: command not found", "stderr_lines": ["/bin/sh: crictl: command not found"], "stdout": "", "stdout_lines": []}
This commit is contained in:
parent
8964dc53df
commit
a7b8708dfc
1 changed files with 2 additions and 2 deletions
|
@ -12,14 +12,14 @@
|
|||
state: absent
|
||||
|
||||
- name: docker | delete calico-node containers
|
||||
shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f"
|
||||
shell: "{{ docker_bin_dir }}/docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty {{ docker_bin_dir }}/docker rm -f"
|
||||
register: docker_calico_node_remove
|
||||
until: docker_calico_node_remove is succeeded
|
||||
retries: 5
|
||||
when: container_manager in ["docker"]
|
||||
|
||||
- name: containerd | delete calico-node containers
|
||||
shell: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
|
||||
shell: '{{ bin_dir }}/crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "{{ bin_dir }}/crictl stopp % && {{ bin_dir }}/crictl rmp %"'
|
||||
register: crictl_calico_node_remove
|
||||
until: crictl_calico_node_remove is succeeded
|
||||
retries: 5
|
||||
|
|
Loading…
Reference in a new issue