[ClusterLabs] ethmonitor resource - for iface which does not exist yet - how?

Ken Gaillot kgaillot at redhat.com
Tue Jun 9 10:22:46 EDT 2020


On Wed, 2020-06-03 at 12:33 +0100, lejeczek wrote:
> hi guys
> 
> I wonder about an idea of 'ethmonitor' watching a net iface
> which is of USB type. Such an iface which would physically
> roam between nodes.
> Would 'ethmonitor' work in such a case?
> I've tried and the resource actually got started (small
> two-node cluster) on the node which has USB iface physically
> absent?! That must be wrong, right?
> But if it's not and that how 'ethmonitor' works(the I got it
> wrong) then what else would be best resource agent for such
> a case of a USB net iface?
> 
> many thanks, L.

ethmonitor sets a node attribute for the node it's running on, marking
whether the interface is active on that node.

It's typically configured as a clone running on all nodes, monitoring
the same interface name.

These days, depending on distribution, interface names for removable
devices might change from boot to boot by default. But there's
generally a way to assign a permanent interface name via udev.

As long as your interface name stays the same, you can use it for what
you want -- configure it as a clone and you will get node attributes on
every node (named ethmonitor-<INTERFACE_NAME> by default). You can then
use location constraints with an attribute-based rule to keep resources
where the interface is. See the man page for examples:

https://www.mankier.com/7/ocf_heartbeat_ethmonitor

-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list