summaryrefslogtreecommitdiffstats
path: root/roles/ands_monitor/templates/scripts/maintain.sh.j2
blob: 45c95136efed82751644baf6187b4e731c2155a4 (plain)
1
2
3
4
5
6
7
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