Apply workaround for NetworkManager and calico (#5230)
Change-Id: I5cb2bdf1a57707c1b8da3e5ac0c80e5c353480a4pull/5233/head
parent
a43e0d3f95
commit
fb591bf232
|
@ -6,6 +6,7 @@ skip_list:
|
||||||
# These either still need to be corrected in the repository and the rules re-enabled or documented why they are skipped on purpose.
|
# These either still need to be corrected in the repository and the rules re-enabled or documented why they are skipped on purpose.
|
||||||
- '301'
|
- '301'
|
||||||
- '302'
|
- '302'
|
||||||
|
- '303'
|
||||||
- '305'
|
- '305'
|
||||||
- '306'
|
- '306'
|
||||||
- '404'
|
- '404'
|
||||||
|
|
|
@ -18,3 +18,9 @@
|
||||||
- name: containerd | delete calico-node containers
|
- 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: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"'
|
||||||
when: container_manager in ["crio", "containerd"]
|
when: container_manager in ["crio", "containerd"]
|
||||||
|
|
||||||
|
- name: Calico | Reload NetworkManager
|
||||||
|
service:
|
||||||
|
name: NetworkManager
|
||||||
|
state: reloaded
|
||||||
|
when: '"running" in nm_check.stdout'
|
||||||
|
|
|
@ -6,6 +6,28 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
|
- name: Calico | Check if host has NetworkManager
|
||||||
|
command: systemctl show NetworkManager
|
||||||
|
register: nm_check
|
||||||
|
failed_when: false
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Calico | Ensure NetworkManager conf.d dir
|
||||||
|
file:
|
||||||
|
path: "/etc/NetworkManager/conf.d"
|
||||||
|
state: directory
|
||||||
|
recurse: yes
|
||||||
|
when: nm_check.rc == 0
|
||||||
|
|
||||||
|
- name: Calico | Prevent NetworkManager from managing Calico interfaces
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
[keyfile]
|
||||||
|
unmanaged-devices=interface-name:cali*;interface-name:tunl*
|
||||||
|
dest: /etc/NetworkManager/conf.d/calico.conf
|
||||||
|
when: nm_check.rc == 0
|
||||||
|
notify: Calico | Reload NetworkManager
|
||||||
|
|
||||||
- name: Calico | Write Calico cni config
|
- name: Calico | Write Calico cni config
|
||||||
template:
|
template:
|
||||||
src: "cni-calico.conflist.j2"
|
src: "cni-calico.conflist.j2"
|
||||||
|
|
Loading…
Reference in New Issue