[ClusterLabs] How to add a constraint to move a resource to other node when a resource stop

wd wd at wdicc.com
Fri May 13 10:08:56 UTC 2016


hi,

I'm running a master/slave 2 node PostgreSQL cluster, and 2 virtual ip
resource, one is for master, one is for slave.

I have add colocation constraint for both virtual ip and master/slave
resource, to ensure virtual ip for master is run at master, and virtual ip
for slave is run at slave. And also add constraint for PostgreSQL promote.

pcs constraint colocation add vip-master with Master pgsql-master
pcs constraint colocation add vip-slave with Slave pgsql-master

pcs constraint order promote pgsql-master then start vip-master
symmetrical=false score=INFINITY
pcs constraint order demote pgsql-master then stop vip-master
symmetrical=false score=0

If I kill PostgreSQL master process, pacemaker will promote slave to new
master, and move master-vip to the new master. But the slave-vip will stop.
So how to let the slave-vip also move to the new master at this situation?
And if I kill slave PostgreSQL, how to let the slave-vip move to the master?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20160513/41fbfd21/attachment-0003.html>


More information about the Users mailing list