[ClusterLabs] Fwd: Three node cluster constraint
wd
wd at wdicc.com
Tue May 31 04:32:36 UTC 2016
sorry, I've sent to the wrong mailist, fwd to users at clusterlabs.org
---------- Forwarded message ----------
From: wd <wd at wdicc.com>
Date: Tue, May 31, 2016 at 12:04 PM
Subject: Three node cluster constraint
To: pacemaker at oss.clusterlabs.org
Hi,
I've setup a three node PostgreSQL cluster, with 2 virtual ip.
vip-master (ocf::qunar:qIPaddr2): Started node2
vip-slave (ocf::qunar:qIPaddr2): Started node3
Master/Slave Set: pgsql-master [pgsql]
pgsql (ocf::qunar:qpgsql): Master node2
pgsql (ocf::qunar:qpgsql): Started node1
pgsql (ocf::qunar:qpgsql): Slave node3
Masters: [ node2 ]
Slaves: [ node1 node3 ]
I want vip-slave is running on slave node if there is any slave node
running. And if there is no slave node running, vip-slave should run at
master node. I've tried these constraint:
Location Constraints:
Ordering Constraints:
promote pgsql-master then start vip-master (score:INFINITY)
(non-symmetrical)
demote pgsql-master then stop vip-master (score:0) (non-symmetrical)
Colocation Constraints:
vip-master with pgsql-master (score:INFINITY) (rsc-role:Started)
(with-rsc-role:Master)
vip-slave with pgsql-master (score:100) (rsc-role:Started)
(with-rsc-role:Slave)
vip-slave with pgsql-master (score:50) (rsc-role:Started)
(with-rsc-role:Master)
If I kill pgsql on node3:
vip-master (ocf::qunar:qIPaddr2): Started node2
vip-slave (ocf::qunar:qIPaddr2): Started node3
Master/Slave Set: pgsql-master [pgsql]
pgsql (ocf::qunar:qpgsql): Master node2
pgsql (ocf::qunar:qpgsql): Slave node1
pgsql (ocf::qunar:qpgsql): Stopped
Masters: [ node2 ]
Slaves: [ node1 ]
Stopped: [ node3 ]
vip-slave will not goto node1, where am I wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20160531/05767273/attachment-0003.html>
More information about the Users
mailing list