[ClusterLabs] Three node cluster constraint

wd wd at wdicc.com
Tue May 31 03:37:05 EDT 2016


You are right, my resource-stickiness settings are lost. after set it
again, it's working now.

On Tue, May 31, 2016 at 3:14 PM, Klaus Wenninger <kwenning at redhat.com>
wrote:

> On 05/31/2016 06:43 AM, wd wrote:
> > I've do more searching, and found "crm_simulate -sL" tool, it says:
> >
> > native_color: vip-slave allocation score on node1: 100
> > native_color: vip-slave allocation score on node2: 50
> > native_color: vip-slave allocation score on node3: INFINITY
> might be due to resource-stickiness ...
> >
> > seems 'pcs constraint colocation add vip-slave with Slave pgsql-master
> > 100' not effect node3 which is also a slave node.
> >
> > On Tue, May 31, 2016 at 12:32 PM, wd <wd at wdicc.com
> > <mailto:wd at wdicc.com>> wrote:
> >
> >     sorry, I've sent to the wrong mailist, fwd
> >     to users at clusterlabs.org <http://clusterlabs.org>
> >
> >     ---------- Forwarded message ----------
> >     From: *wd* <wd at wdicc.com <mailto:wd at wdicc.com>>
> >     Date: Tue, May 31, 2016 at 12:04 PM
> >     Subject: Three node cluster constraint
> >     To: pacemaker at oss.clusterlabs.org
> >     <mailto: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 ?
> >
> >
> >
> >
> > _______________________________________________
> > Users mailing list: Users at clusterlabs.org
> > http://clusterlabs.org/mailman/listinfo/users
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20160531/2ad86926/attachment-0003.html>


More information about the Users mailing list