diff options
Diffstat (limited to 'roles/ands_monitor/templates/scripts/maintain.sh.j2')
-rwxr-xr-x | roles/ands_monitor/templates/scripts/maintain.sh.j2 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/ands_monitor/templates/scripts/maintain.sh.j2 b/roles/ands_monitor/templates/scripts/maintain.sh.j2 new file mode 100755 index 0000000..45c9513 --- /dev/null +++ b/roles/ands_monitor/templates/scripts/maintain.sh.j2 @@ -0,0 +1,8 @@ +#! /bin/bash + +# Left-over network interfaces on the OpenVSwitch bridge after pod termination +ifaces=$(ovs-vsctl show | grep -oP "could not open network device\s*\Kveth[a-f0-9]+" | wc -l) +if [ $ifaces -gt 25 ]; then + echo "Cleaning rogue interfaces ($ifaces) on $(hostname)" + {{ ands_script_path }}/clean_rogue_interfaces.sh > /dev/null +fi |