I have a similar setup running with this simple configuration:<br><br>node mexico<br>node washington<br>primitive LDAP lsb:openldap \<br> op monitor interval="30s"<br>primitive masterIP ocf:heartbeat:IPaddr \<br>
params ip="XXX.XXX.XXX.XXX" cidr_netmask="21" \<br> meta migration-threshold="3"<br>primitive pingd ocf:pacemaker:ping \<br> params dampen="5s" multiplier="1000" host_list="XXX.XXX.XXX.XXX" \<br>
op monitor interval="20s" timeout="15s"<br>clone LDAP-clone LDAP \<br> meta target-role="Started" is-managed="true"<br>clone pingd-clone pingd \<br> meta target-role="Started"<br>
location cli-prefer-masterIP masterIP \<br> rule $id="cli-prefer-rule-masterIP" inf: #uname eq washington<br>location connected masterIP \<br> rule $id="connected-rule" -inf: not_defined pingd or pingd lte 0<br>
location primNode masterIP \<br> rule $id="prefered_primNode" 500: #uname eq washington<br>colocation IP_with_LDAP inf: masterIP LDAP-clone<br><br>Not on Amazon cloud but on a real hardware though. You can ignore pingd part.<br>
<br><div class="gmail_quote">On Mon, Jun 27, 2011 at 4:56 PM, veghead <span dir="ltr"><<a href="mailto:sean@studyblue.com">sean@studyblue.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Serge Dubrouski <sergeyfd@...> writes:<br>
<div class="im">> On Mon, Jun 27, 2011 at 3:33 PM, veghead <sean <at> <a href="http://studyblue.com" target="_blank">studyblue.com</a>> wrote:<br>
> If I remove the co-location, won't the elastic_ip resource just stay where it<br>
> is? Regardless of what happens to LDAP?<br>
><br>
> Right. That's why I think that you don't really want to do it. You have<br>
> to make sure that your IP is up where you LDAP is up. <br>
<br>
</div>Okay. So I took a step and revamped the configuration to test the elastic_ip<br>
less frequently and with a long timeout. I committed the changes, but "crm<br>
status" doesn't reflect the resources in question.<br>
<br>
Here's the new config:<br>
<br>
---snip---<br>
# crm configure show<br>
node $id="d2b294cf-328f-4481-aa2f-cc7b553e6cde" ldap1.example.ec2<br>
node $id="e2a2e42e-1644-4f7d-8e54-71e1f7531e08" ldap2.example.ec2<br>
primitive elastic_ip lsb:elastic-ip \<br>
op monitor interval="30" timeout="300" on-fail="ignore"<br>
<div class="im">requires="nothing"<br>
primitive ldap lsb:dirsrv \<br>
op monitor interval="15s" on-fail="standby" requires="nothing"<br>
clone ldap-clone ldap<br>
</div><div class="im">colocation ldap-with-eip inf: elastic_ip ldap-clone<br>
</div><div class="im">order ldap-after-eip inf: elastic_ip ldap-clone<br>
property $id="cib-bootstrap-options" \<br>
dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \<br>
cluster-infrastructure="Heartbeat" \<br>
stonith-enabled="false" \<br>
no-quorum-policy="ignore" \<br>
stop-all-resources="true"<br>
rsc_defaults $id="rsc-options" \<br>
resource-stickiness="100"<br>
---snip---<br>
<br>
</div>And here's the output from "crm status":<br>
<br>
---snip---<br>
# crm status<br>
============<br>
Last updated: Mon Jun 27 18:50:14 2011<br>
Stack: Heartbeat<br>
Current DC: ldap2.studyblue.ec2 (e2a2e42e-1644-4f7d-8e54-71e1f7531e08) -<br>
partition with quorum<br>
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87<br>
2 Nodes configured, unknown expected votes<br>
2 Resources configured.<br>
============<br>
<br>
Online: [ ldap1.example.ec2 ldap2.example.ec2 ]<br>
---snip---<br>
<br>
I restarted the nodes one at a time - first I restarted ldap2, then I restarted<br>
ldap1. When ldap1 went down, ldap2 stopped the ldap resource and didn't make any<br>
attempt to start the elastic_ip resource:<br>
<br>
---snip---<br>
pengine: [12910]: notice: unpack_config: On loss of CCM Quorum: Ignore<br>
pengine: [12910]: info: unpack_config: Node scores: 'red' = -INFINITY, 'yellow'<br>
= 0, 'green' = 0<br>
pengine: [12910]: info: determine_online_status: Node ldap2.example.ec2 is<br>
online<br>
pengine: [12910]: notice: native_print: elastic_ip (lsb:elastic-ip):<br>
Stopped<br>
pengine: [12910]: notice: clone_print: Clone Set: ldap-clone<br>
pengine: [12910]: notice: short_print: Stopped: [ ldap:0 ldap:1 ]<br>
pengine: [12910]: notice: LogActions: Leave resource elastic_ip<br>
(Stopped)<br>
pengine: [12910]: notice: LogActions: Leave resource ldap:0 (Stopped)<br>
pengine: [12910]: notice: LogActions: Leave resource ldap:1 (Stopped)<br>
---snip---<br>
<br>
After heartbeat/pacemaker came back up on ldap1, it terminated the ldap service<br>
on ldap1. Now I'm just confused.<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: <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><br clear="all"><br>-- <br>Serge Dubrouski.<br>