<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 9/27/23 16:02, Ken Gaillot wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6e8a79aa238f301af8d9d02741d77b8ca327e044.camel@redhat.com">
      <pre class="moz-quote-pre" wrap="">On Wed, 2023-09-27 at 15:42 +0300, Andrei Borzenkov wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">On Wed, Sep 27, 2023 at 3:21 PM Adam Cecile <a class="moz-txt-link-rfc2396E" href="mailto:acecile@le-vert.net"><acecile@le-vert.net></a>
wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Hello,


I'm struggling to understand if it's possible to create some kind
of constraint to avoid two different resources to be running on the
same host.

Basically, I'd like to have floating IP "1" and floating IP "2"
always being assigned to DIFFERENT nodes.

Is that something possible ?
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Sure, negative colocation constraint.

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Can you give me a hint ?

</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Using crmsh:

colcoation IP1-no-with-IP2 -inf: IP1 IP2

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Thanks in advance, Adam.
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
To elaborate, use -INFINITY if you want the IPs to *never* run on the
same node, even if there are no other nodes available (meaning one of
them has to stop). If you *prefer* that they run on different nodes,
but want to allow them to run on the same node in a degraded cluster,
use a finite negative score.</pre>
    </blockquote>
    <p>That's exactly what I tried to do:</p>
    <p>crm configure primitive Freeradius systemd:freeradius.service op
      start interval=0 timeout=120 op stop interval=0 timeout=120 op
      monitor interval=60 timeout=100<br>
      crm configure clone Clone-Freeradius Freeradius<br>
      <br>
      crm configure primitive Shared-IPv4-Cisco-ISE-1 IPaddr2 params
      ip=10.1.1.1 nic=eth0 cidr_netmask=24 meta migration-threshold=2 op
      monitor interval=60 timeout=30 resource-stickiness=50<br>
      crm configure primitive Shared-IPv4-Cisco-ISE-2 IPaddr2 params
      ip=10.1.1.2 nic=eth0 cidr_netmask=24 meta migration-threshold=2 op
      monitor interval=60 timeout=30 resource-stickiness=50<br>
      <br>
      crm configure location Shared-IPv4-Cisco-ISE-1-Prefer-BRT
      Shared-IPv4-Cisco-ISE-1 50: infra-brt<br>
      crm configure location Shared-IPv4-Cisco-ISE-2-Prefer-BTZ
      Shared-IPv4-Cisco-ISE-2 50: infra-btz<br>
      crm configure colocation Shared-IPv4-Cisco-ISE-Different-Nodes
      -100: Shared-IPv4-Cisco-ISE-1 Shared-IPv4-Cisco-ISE-2</p>
    <p>My hope is that IP1 stays in infra-brt and IP2 goes on infra-btz.
      I want to allow them to keep running on different host so I also
      added stickiness. However, I really do not want them to both run
      on same node so I added a colocation with negative higher score.</p>
    <p>Does it looks good to you ?<br>
    </p>
    <p><br>
    </p>
    <div id="grammalecte_menu_main_button_shadow_host" style="width:
      0px; height: 0px;"></div>
  </body>
</html>