we can not just check if MII Status is up for bonding mode 4, since the kernel will always report the bond device as UP
even if all cables are disconneccted.
For mode 4, ignore the status of the bond device and instead chek if at least one slave interface is up
when determining if the device is good or bad
ctdb setifacelink $IFACE down
continue;
}
+ grep -q '^Bonding Mode: IEEE 802.3ad Dynamic link aggregation' /proc/net/bonding/$REALIFACE && {
+ grep 'MII Status:' /proc/net/bonding/$REALIFACE | tail -n +2 | grep -q '^MII Status: up' || {
+ echo No active slaves for 802.ad bond device $REALIFACE
+ ctdb setifacelink $IFACE down
+ fail=1
+ continue
+ }
+ }
ok=1 # we only set ok for interfaces known to ctdbd
ctdb setifacelink $IFACE up
continue;