[ClusterLabs] ethmonitor resource - for iface which does not exist yet - how?
lejeczek
peljasz at yahoo.co.uk
Tue Jun 30 10:09:45 EDT 2020
On 09/06/2020 15:22, Ken Gaillot wrote:
> 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
>
But why would I need to clone such a ethmonitor resource?
If ifaces naming is taken care of, then should a "regular"
resource not just work?
Then, if the interface exits in the node then 'ethmonitor'
is started and colocation constraints just follow, no?
Or I completely failed to grasp the need for 'clone' with
'ethmonitor' ?
many thanks, L.
More information about the Users
mailing list