From 9e8e069b2330ef5c8f5d4e1747d29d12596779e8 Mon Sep 17 00:00:00 2001 From: Anupam Basak Date: Tue, 26 Feb 2019 14:02:00 +0530 Subject: [PATCH] remove kube bridge on reset (#4250) --- roles/network_plugin/kube-router/tasks/reset.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/network_plugin/kube-router/tasks/reset.yml b/roles/network_plugin/kube-router/tasks/reset.yml index 7c3fa5347..23f79da4f 100644 --- a/roles/network_plugin/kube-router/tasks/reset.yml +++ b/roles/network_plugin/kube-router/tasks/reset.yml @@ -7,3 +7,16 @@ - name: reset | remove the network device created by kube-router command: ip link del kube-dummy-if when: kube_dummy_if.stat.exists + +- name: check kube-bridge exists + stat: + path: /sys/class/net/kube-bridge + register: kube_bridge_if + +- name: reset | donw the network bridge create by kube-router + command: ip link set kube-bridge down + when: kube_bridge_if.stat.exists + +- name: reset | remove the network bridge create by kube-router + command: ip link del kube-bridge + when: kube_bridge_if.stat.exists