HomeClusterLabs Projects

Medium: ethmonitor: correctly detect when the network is unplugged.

Description

Medium: ethmonitor: correctly detect when the network is unplugged.

The ethmonitor does not return the correct status
1). when the wire is unplugged from network interface,

for example, the output for eth0 is:
# ip -o link show up dev eth0
# eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state

DOWN qlen 1000
2). when lower layer is down for a VLAN, for example, the output:

  1. ip -o link show up dev vlan2
  2. vlan2@bond2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc

noqueue state LOWERLAYERDOWN

Solution:

both of the above status can be detected by 'grep NO-CARRIER'

Details

Provenance
Sunlit Jiang <sunlit.jiang@foxmail.com>Authored on May 29 2013, 6:51 AM
Sunlit Jiang <sunlit.jiang@live.com>Committed on May 29 2013, 6:51 AM
Parents
rRa00878d65afc: Merge pull request #224 from davidvossel/nfs_init_improvements
Branches
Unknown
Tags
Unknown

Event Timeline