Bynar
Bynar copied to clipboard
Auto remediate bonding issue
We often see issues with interface goes down in a bonding configuration which can be simply brought up/fix by ifup/ifdown (60 to 70%) of the time.
- validation of OS
- check bonding cat /proc/net/bonding/bond1 (active / passive - based on the type of bonding configuration)
- ifdown
- ifup
- validate.
if not up,
file a ticket to do the following.
- check the link on the switch port, if not green engage network team. If that is not fixing,
- clean the SFP/reseat it, if not fixing
- change the SFP, if not fixing
- change the fiber, if not fixing
- Raise a Vendor case
Yeah I think we can do that.
So there's a few ways i can see to handle this:
- first would be using a library like this: https://github.com/andrew-d/interfaces-rs to get the interfaces on the machine, check if they're a bond and then check the up/down status and take appropriate action.
- the second way would be to open the
/proc/net/bonding
directory and open each file in there and parse the output to see if they're up/down and take appropriate action.
I generally prefer using library calls over parsing text