From 0d1be39a97d85436edf2ed0f1db250846c0ba504 Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Wed, 5 Dec 2018 04:18:50 +0100 Subject: [PATCH] Reset: Check for kube-ipvs0 presence before remove it (#3816) --- roles/reset/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 5c776a3c1..ac0351d8f 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -112,10 +112,16 @@ when: - kube_proxy_mode == 'ipvs' +- name: reset | check kube-ipvs0 network device + stat: + path: /sys/class/net/kube-ipvs0 + register: kube_ipvs0 + - name: reset | Remove kube-ipvs0 command: "ip link del kube-ipvs0" when: - kube_proxy_mode == 'ipvs' + - kube_ipvs0.stat.exists - name: reset | delete some files and directories file: