[ClusterLabs] Antw: [EXT] Moving multi-state resources

Alastair Basden a.g.basden at durham.ac.uk
Wed May 12 10:16:53 EDT 2021


Oddly enough, if I:
pcs resource move resourcedrbdClone node2
it moves it to node 2 okay.

But then if I
pcs resource clear resourcedrbdClone
it moves it back to node1.

Which is odd, given its score for role Master is higher on node 2.

Is there a way of getting pcs to show why it has made those decisions?

On Wed, 12 May 2021, Ulrich Windl wrote:

> [EXTERNAL EMAIL]
>
> My guess is default stickiness being > 0.
>
>>>> Alastair Basden <a.g.basden at durham.ac.uk> schrieb am 12.05.2021 um 11:58
> in
> Nachricht <alpine.DEB.2.22.394.2105121045380.3533 at xps14>:
>> Hi all,
>>
>> Some help required with master/slave moving please...
>>
>> I have set up a resource with:
>> pcs resource create resourcedrbd ocf:linbit:drbd drbd_resource=disk1 op
>> monitor interval=60s
>> pcs resource master resourcedrbdClne resourcedrbd master‑max=1
>> master‑node‑max=1 clone‑max=2 clone‑node‑max=1 notify=true
>> pcs constraint location resourcedrbdClone prefers node1=100
>> pcs constraint location resourcedrbdClone prefers node1=50
>> pcs constraint location resourcedrbdClone avoids node3
>> pcs constraint location resourcedrbdClone avoids node4
>> pcs resource op add resourcedrbd monitor interval=61s role=Master
>> pcs constraint location resourcedrbdClone rule role=master score=100 \#uname
>
>> eq node1
>> pcs constraint location resourcedrbdClone rule role=master score=50 \#uname
>
>> eq node2
>>
>>
>> If I put node1 into standby:
>> pcs cluster standby node1
>> It works, and moves the resource to node2.
>>
>> However, when I bring it back:
>> pcs cluster unstandby node1
>> the resource remains on node2.
>>
>> I want the resource to move back to node1.
>>
>> What have I missed?  I thought the location rule should have sorted this
>> out.
>>
>> I have also tried:
>> pcs constraint rule add location‑resourcedrbdClone‑1 role=master score=100
>> \#uname eq node1
>> (getting the location‑resourcedrbdClone‑1 ID from
>> /var/lib/pacemaker/cib/cib.xml ‑ though I guess there might be a better
>> way to get the ID through pcs)
>>
>> And this doesn't help.
>>
>> Thanks,
>> Alastair.
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>


More information about the Users mailing list