Browse Source

calico: fix NetworkManager check (#7169)

Previous check for presence of NM assumed "systemctl show
NetworkManager" would exit with a nonzero status code, which seems not
the case anymore with recent Flatcar Container Linux.

This new check also checks the activeness of network manager, as
`is-active` implies presence.

Signed-off-by Jorik Jonker <jorik@kippendief.biz>

(cherry picked from commit bba55faae8)
pull/7325/head
Jorik Jonker 4 years ago
committed by Kubernetes Prow Robot
parent
commit
6b184905e6
1 changed files with 1 additions and 1 deletions
  1. 2
      roles/network_plugin/calico/tasks/install.yml

2
roles/network_plugin/calico/tasks/install.yml

@ -8,7 +8,7 @@
- name: Calico | Check if host has NetworkManager
# noqa 303 Should we use service_facts for this?
command: systemctl show NetworkManager
command: systemctl is-active --quiet NetworkManager.service
register: nm_check
failed_when: false
changed_when: false

Loading…
Cancel
Save