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)
commit1da757d91ae17ac37ba6c98a3ba6e63b69a287d5
tree62d8da3aa2ea52cd195302506410e117d80e5aae
parent4b5c9c7991e5a78473d29b39bd9235af6abd2fc9
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>
(This used to be ctdb commit 501f19b16fd6d67fbb754248868c38ee5bcf79ef)
ctdb/config/events.d/10.interface