mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
bonding mode 4 monitoring:
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 (This used to be ctdb commit a6930cec6d9503dba18b9d4839d87a1c1a8ddba2)
This commit is contained in:
parent
2f1395ce03
commit
d97e42183e
@ -63,6 +63,14 @@ monitor_interfaces()
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user