<div dir="ltr"><div dir="ltr"><div><br></div>Thanks for the tips on the constraint rules.<div><br></div><div>I currently have two separate constraint for each ethmonitor - I did not realise that you could have a constraint rule that can combine multiple ethmonitors.</div></div><div><br></div><div>Based on your suggestion, I have now used one constraint, as such:</div><div><br></div><div>score=-INFINITY ethmonitor-net4 eq 0 and ethmonitor-net5 eq 0<br></div><div><br></div><div>and I have tested it (by simulating a network interface down by disconnecting the interface in vmware) and it works as expected - when, for example, net4 interface is down on both nodes, the cluster does not try to move the virtual ip resource group, or take it down.</div><div><br></div><div>I'll now need to apply this same logic to some ping monitor resources.</div><div><br></div><div>Thank you for your help!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 15 Aug 2019 at 15:13, Ken Gaillot <<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2019-08-15 at 10:59 +0100, solarmon wrote:<br>
> Hi,<br>
> <br>
> I have a two node cluster setup where each node is multi-homed over<br>
> two separate external interfaces - net4 and net5 - that can have<br>
> traffic load balanced between them.<br>
> <br>
> I have created multiple virtual ip resources (grouped together) that<br>
> should only be active on only one of the two nodes.<br>
> <br>
> I have created ethmonitor resources for net4 and net5 and have<br>
> created a constraint against the virtual ip resources group.<br>
> <br>
> When one of the net4/net5 interfaces is taken on the active node<br>
> (where the virtual IPs are), the virtual ip resource group switches<br>
> to the other node. This is working as expected.<br>
> <br>
> However, when either of the net4/net5 interfaces are down on BOTH<br>
> nodes - for example, if net4 is down on BOTH nodes - the cluster<br>
> seems to get itself in to a flapping state where there virtual IP<br>
> resources keeps becoming available then unavailable. Or the virtual<br>
> IP resources group isn't running on any node.<br>
> <br>
> Since net4 and net5 interfaces can have traffic load-balanced across<br>
> them, it is acceptable for the virtual IP resources to be running any<br>
> of the node, even if the same interface (for example, net4) is down<br>
> on both nodes, since the other interface (for example, net5) is still<br>
> available on both nodes.<br>
> <br>
> What is the recommended way to configure the ethmonitor and<br>
> constraint resources for this type of multi-homed setup?<br>
<br>
It's probably the constraint. When monitoring a single interface, the<br>
location constraint should have rule giving a score of -INFINITY when<br>
the special node attribute's value is 0.<br>
<br>
However in your case, your goal is more complicated, so the rule has to<br>
be as well. I'd set a -INFINITY score when *both* attributes are 0<br>
(e.g. ethmonitor-net4 eq 0 and ethmonitor-net5 eq 0). That will keep<br>
the IPs on a node where at least one interface is working.<br>
<br>
If you additionally want to prefer a node with both interfaces working,<br>
I'd add 2 more rules giving a slightly negative preference to a node<br>
where a single attribute is 0 (one rule for each attribute).<br>
-- <br>
Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>><br>
<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
</blockquote></div></div>