mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
reset: unmount calico cgroup2 fs before deleting /run/calico (#13592)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
This commit is contained in:
@@ -28,3 +28,18 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
changed_when: false
|
||||
|
||||
# The calico-node -init container mounts the root cgroup2 fs here, so it must be unmounted before removal
|
||||
- name: Reset | unmount calico cgroup2 filesystem
|
||||
ansible.posix.mount:
|
||||
path: /run/calico/cgroup
|
||||
state: unmounted
|
||||
tags:
|
||||
- files
|
||||
|
||||
- name: Reset | delete calico runtime directory
|
||||
file:
|
||||
path: /run/calico
|
||||
state: absent
|
||||
tags:
|
||||
- files
|
||||
|
||||
@@ -384,7 +384,6 @@
|
||||
- /var/lib/kube-router
|
||||
- /var/lib/calico
|
||||
- /etc/cilium
|
||||
- /run/calico
|
||||
- /etc/bash_completion.d/kubectl.sh
|
||||
- /etc/bash_completion.d/crictl
|
||||
- /etc/bash_completion.d/nerdctl
|
||||
@@ -437,10 +436,13 @@
|
||||
include_role:
|
||||
name: "network_plugin/{{ kube_network_plugin }}"
|
||||
tasks_from: reset
|
||||
apply:
|
||||
tags:
|
||||
- network
|
||||
when:
|
||||
- kube_network_plugin in ['flannel', 'cilium', 'kube-router', 'calico']
|
||||
tags:
|
||||
- network
|
||||
- always
|
||||
|
||||
- name: Reset | Restart network
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user