Andrew: It's not that the slave IP doesn't move back...it's that the slave IP simply doesn't run *anywhere*....even when both nodes are up, the slave ip will not run anywhere.  I'm fairly convinced this is a bug....<div>
<br><br><div class="gmail_quote">On Thu, Sep 29, 2011 at 1:21 AM, Andrew Beekhof <span dir="ltr"><<a href="mailto:andrew@beekhof.net">andrew@beekhof.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Sat, Aug 27, 2011 at 9:07 AM, Chris Redekop <<a href="mailto:chris@replicon.com">chris@replicon.com</a>> wrote:<br>
> I'm attempting to set up a master/slave database cluster where the master is<br>
> R/W and the slave is R/O.  The master failure scenario works fine (slave<br>
> becomes master, master vip moves over)....however when the slave resource<br>
> goes down I want the slave vip to move to the master and then move back when<br>
> the slave comes back up...I can't seem to get this to work properly.  Here's<br>
> my test config I'm playing with:<br>
> primitive postgresql ocf:custom:pgsql \<br>
>         op monitor interval="30" timeout="30" depth="0"<br>
> primitive primaryip ocf:heartbeat:IPaddr2 \<br>
>         params ip="10.0.100.102"<br>
> primitive slaveip ocf:heartbeat:IPaddr2 \<br>
>         params ip="10.0.100.103"<br>
> ms ms_postgresql postgresql \<br>
>         meta clone-max="2" clone-node-max="1" master-max="1"<br>
> master-node-max="1" notify="true" target-role="Started"<br>
> colocation postgres_on_primaryip inf: primaryip ms_postgresql:Master<br>
> colocation slaveip_on_master 101: slaveip ms_postgresql:Master<br>
> colocation slaveip_on_slave 1000: slaveip ms_postgresql:Slave<br>
> property $id="cib-bootstrap-options" \<br>
>         dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \<br>
>         cluster-infrastructure="openais" \<br>
>         expected-quorum-votes="2" \<br>
>         stonith-enabled="false" \<br>
>         no-quorum-policy="ignore" \<br>
>         last-lrm-refresh="1314201732"<br>
> rsc_defaults $id="rsc-options" \<br>
>         resource-stickiness="100"<br>
> With the configuration like this it looks pretty straight forward but it<br>
> actually results in the slaveip not being run on *either* node.  As far as I<br>
> can figure out it seems when you have a colocation to a specific role it<br>
> implicitly generates a -inf record for the other role.  So the :Master<br>
> generates a -inf for :Slave, and :Slave generates a -inf for :Master, and<br>
> since slaveip has a colocation record for both they get added together<br>
> resulting in a -inf score for both nodes...if I wasn't so new at this I<br>
> would think that is a bug.  If I key the ip off the node's up/down status<br>
> (like via 'colocation whatever -101: slaveip primaryip') then it works if I<br>
> standby the slave node but of course it doesn't work if the resource fails<br>
> while the node stays up.  Can anyone shed some light on how to make this<br>
> work properly?  Thanks!<br>
<br>
</div></div>Are you sure its not just the stickiness value preventing it from<br>
moving back to the slave when it returns?<br>
<div><div></div><div class="h5"><br>
><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
> <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
><br>
> Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
> Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
> Bugs:<br>
> <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
</div></div></blockquote></div><br></div>