>From Suse Docs<br><br><h3 class="title">7.4.2. Cleaning Up Resources<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="http://doc.opensuse.org/products/draft/SLE-HA/SLE-ha-guide_sd_draft/cha.ha.manual_config.html#sec.ha.manual_config.cleanup">¶</a></span></h3>
<p>
A resource will be automatically restarted if it fails, but each failure
raises the resource's failcount. If a
<code class="literal">migration-threshold</code> has been set for that resource,
the node will no longer be allowed to run the resource as soon as the
number of failures has reached the migration threshold.
</p><br><br><div class="gmail_quote">2013/3/4 Tommy Cooper <span dir="ltr"><<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><span>I have removed the order and colocation statements but I am still getting the same results. Asterisk keeps restarting on the same server, how can I switch to the other server when asterisk fails? I used those statements to make sure that both services are running on the same server and to make sure that the virtual IP is started before asterisk.<var></var><br>
</span></div>
<div><br></div>
<div style="FONT-FAMILY:times new roman,new york,times,serif;FONT-SIZE:12pt">
<div style="FONT-FAMILY:times new roman,new york,times,serif;FONT-SIZE:12pt">
<div dir="ltr"><font face="Arial"><div class="im">----- Forwarded Message -----<br><b><span style="FONT-WEIGHT:bold">From:</span></b> Jake Smith <<a href="mailto:jsmith@argotec.com" target="_blank">jsmith@argotec.com</a>><br>
<b><span style="FONT-WEIGHT:bold">To:</span></b> Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>>; The Pacemaker cluster resource manager <<a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a>> <br>
</div><div class="im"><b><span style="FONT-WEIGHT:bold">Sent:</span></b> Monday, March 4, 2013 10:00 PM<br><b><span style="FONT-WEIGHT:bold">Subject:</span></b> Re: [Pacemaker] Fw: Cluster resources failing to move<br></div>
</font></div><div class="im"><br><br>----- Original Message -----<br>> From: "Tommy Cooper" <<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>><br>> To: <a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a><br>
</div><div class="im">> Sent: Monday, March 4, 2013 3:51:03 PM<br></div><div class="im">>
Subject: [Pacemaker] Fw: Cluster resources failing to move<br>> <br>> <br>> <br>> <br>> Thank you for your prompt reply. I actually wanted to create an<br>> active/passive cluster, so if either the network or Asterisk fails<br>
> these services could be migrated to the other server. As I already<br>> stated earlier, the current config notifies me if asterisk is down<br>> but does not start asterisk on the other server.<br><br></div><div class="im">
Did asterisk restart on the same server? <- this is what I would expect pacemaker to do.<br><br>Removing the colocation (and order) statements didn't have any effect?<br><br>> <br>> <br></div><div><div class="h5">
> ----- Forwarded Message -----<br>> From: Jake Smith <<a href="mailto:jsmith@argotec.com" target="_blank">jsmith@argotec.com</a>><br>> To: Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>>; The
Pacemaker cluster<br>> resource manager <<a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a>><br>> Sent: Monday, March 4, 2013 9:29 PM<br>> Subject: Re: [Pacemaker] Cluster resources failing to move<br>
> <br>> <br>> ----- Original Message -----<br>> > From: "Tommy Cooper" < <a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a> ><br>> > To: <a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a><br>
> > Sent: Monday, March 4, 2013 2:19:22 PM<br>> > Subject: [Pacemaker] Cluster resources failing to move<br>> > <br>> > <br>> > <br>> > <br>> > Hi,<br>> > <br>> > <br>
> > I am trying to configure a 2 node cluster using pac emaker 1.1.7<br>> > and<br>> >
corosync 1.4.1. I. I want pacemaker to provide the virual IP<br>> > (192.168.1.115), monitor Asterisk (PBX) and failover to the othe<br>> > server. If I switch off pacemaker and/or corosync the cluster<br>> > resources switch to the other node. I have also configured<br>
> > <a href="http://res_corosync.so/" target="_blank">res_corosync.so</a> module in Asterisk However if i either switch off<br>> > asterisk using service *service name* stop, the following error is<br>> > shown: Failed actions:<br>
> > p_asterisk_monitor_10000 (node=node1.localdomain, call=10, rc=7,<br>> > status=complete): not running<br>> > <br>> <br>> What do you want/expect to happen when you stop asterisk that<br>> doesn't? The monitor showing not running (failed) is expected if<br>
> some outside event stopped the resource.<br>> <br>> > Corosync configuration:<br>> > <br>> > compatibility:
whitetank<br>> > totem {<br>> > version: 2<br>> > secauth: off<br>> > interface {<br>> > member {<br>> > memberaddr: 192.168.1.113<br>> > }<br>> > member {<br>> > memberaddr: 192.168.1.114<br>
> > }<br>> > ringnumber: 0<br>> > bindnetaddr: 192.168.1.0<br>> > mcastport: 5405<br>> > ttl: 1<br>> > }<br>> > transport: udpu<br>> > }<br>> > logging {<br>> > fileline: off<br>
> > to_logfile: yes<br>> > to_syslog: yes<br>> > debug: on<br>> > logfile: /var/log/cluster/corosync.log<br>> > debug: off<br>> > timestamp: on<br>> > logger_subsys {<br>> > subsys: AMF<br>
> > debug: off<br>> > }<br>> > }<br>> > <br>> > amf {<br>> > mode: disabled<br>> > }<br>> > quorum {<br>> > provider: corosync_votequorum<br>> > expected_votes: 3<br>
> > }<br>>
> <br>> > crm configure status:<br>> > <br>> > node node1.localdomain<br>> > node node2.localdomain<br>> > primitive failover-ip ocf:heartbeat:IPaddr2 \<br>> > params ip="192.168.1.115" cidr_netmask="24" nic="eth6" \<br>
> > op start interval="0" timeout="30" \<br>> > op monitor interval="1s" timeout="30" start-delay="0" \<br>> > op stop interval="0" timeout="30s" \<br>
> > meta target-role="started"<br>> > primitive p_asterisk ocf:heartbeat:asterisk \<br>> > params user="root" group="root" maxfiles="65536" \<br>> > op start interval="0" timeout="30s" \<br>
> > op monitor interval="10s" timeout="30s" \<br>> > op stop interval="0" timeout="30s"<br>> > group voip failover-ip p_asterisk<br>> <br>> You don't need these colocation and order statements if you have the<br>
> resources grouped - remove them. The group is a syntax shortcut for<br>> writing
order and colocation statements so the above is enforcing an<br>> order of ip then asterisk and a colocation of asterisk with ip. Also<br>> the colocation below is backwards and *might* be causing your<br>> issues.<br>
> <br>> HTH<br>> Jake<br>> <br>> > colocation asterisk_cluster inf: failover-ip p_asterisk<br>> > order start_order inf: failover-ip p_asterisk<br>> > property $id="cib-bootstrap-options" \<br>
> > dc-version="1.1.7-6.el6-148fccfd5985c5590cc601123c6c16e966b85d14" \<br>> > cluster-infrastructure="openais" \<br>> > expected-quorum-votes="2" \<br>> > stonith-enabled="false" \<br>
> > no-quorum-policy="ignore"<br>> > rsc_defaults $id="rsc-options" \<br>> > resource-stickiness="100"<br>> > <br>> > <br>> > <br>> > <br>> > <br>
> > _______________________________________________<br>> > Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">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></div></div>> > Project Home: <a href="http://www.clusterlabs.org/" target="_blank">http://www.clusterlabs.org/</a><br>> > Getting started:<br>> > <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://bugs.clusterlabs.org/" target="_blank">http://bugs.clusterlabs.org/</a><div class="im"><br>> > <br>> <br>> <br>> <br>> _______________________________________________<br>> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">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></div>> Project Home: <a href="http://www.clusterlabs.org/" target="_blank">http://www.clusterlabs.org/</a><br>
> Getting started:<br>> <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://bugs.clusterlabs.org/" target="_blank">http://bugs.clusterlabs.org/</a><br>
> <br><br><br></div></div></div></div><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://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>esta es mi vida e me la vivo hasta que dios quiera