eventscripts: A missing interface should cause monitoring to fail
authorMartin Schwenke <martin@meltin.net>
Fri, 12 Jul 2013 02:48:34 +0000 (12:48 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 19 Jul 2013 05:35:41 +0000 (15:35 +1000)
commit501f19b16fd6d67fbb754248868c38ee5bcf79ef
tree0eb09b722a4311c765aebfae9c074a1db8edb831
parentc6ab0f9405d5fa5b0b1693bc92e59da0d555a9d7
eventscripts: A missing interface should cause monitoring to fail

A missing interface is at least as bad as an interface with a link
that is down so should have a similar effect.

This couldn't be done previously because orphaned interfaces used to
be listed for monitoring.  This was worked around in 10.interface in
commit 49b2d1bd9554461ed8edbfc21e777c0eca9e1443 and fixed in ctdbd in
commit cc1a3ae911d3fee8b87fda5de5ab6d9499d7510a.

If $CTDB_PARTIALLY_ONLINE_INTERFACES="yes" then monitoring won't
actually fail but the interface is still marked as down.

While we're touching this code, use "ip link" instead of "ip addr".
It is marginally cheaper but not enough for a separate patch.  ;-)

This effectively reverts d67955b42f7627be9dae995230c8fcbb8a948ec2.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/10.interface