[ClusterLabs] Moving a resource when another resource fails

john tillman johnt at panix.com
Fri Feb 26 08:11:36 EST 2021


> On Wed, 2021-02-24 at 15:33 -0500, john tillman wrote:
>> Good day all,
>>
>> I'm trying to set up my cluster such that when mysql can't run, my
>> VIP
>> will move to another node with a working mysql.  I'm trying to do
>> this
>> with a location constraint but can't quite figure out the syntax.
>
> You want colocation rather than location -- colocate the VIP with
> mysql.
>

That worked.  Thank you very much!


>> I have a resource myVIP.
>> simple VIP resource.  It only runs on one node at a time.  My
>> applications
>> connect through it to the database.
>>
>> I have a resource myDB-clone that runs on two nodes.  It is simply a
>> mysqld resource, cloned to the two nodes I need it on.
>>
>> FYI, behind the scenes I have a master-master replication
>> configuration
>> but I use the VIP so that all writes go to the same DB.
>>
>> According to the man page for pcs setting up the rule for this
>> constraint
>> requires an "expression" (or more then one).  That's where I'm having
>> the
>> problem.
>>
>> My pcs command looks like:
>>
>> pcs  constraint  location  myVIP  rule  constraint-id=Rule1
>> score=-INFINITY  <insert expression here>
>> the expression I'm looking for is one that will determine if mysqld,
>> myDB-clone, is running on this node and if it is not then have the
>> -INFINITY score applied and move myVIP to the other node.
>>
>> Any help/suggestions would be appreciated.
>>
>> -John
>>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
>>
> --
> Ken Gaillot <kgaillot at redhat.com>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
>




More information about the Users mailing list