crm_mon -Arf <br><br>look if the fail-count increment<br><br><div class="gmail_quote">2013/3/4 Tommy Cooper <span dir="ltr">&lt;<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>&gt;</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>Is this the correct way to do it?</span></div>

<div><span></span> </div>
<div style="font-size:16px;font-style:normal;background-color:transparent;font-family:times new roman,new york,times,serif"><span><div class="im">primitive p_asterisk ocf:heartbeat:asterisk \<br> params user=&quot;root&quot; group=&quot;root&quot; maxfiles=&quot;65536&quot; \<br>
 op start interval=&quot;0&quot; timeout=&quot;30s&quot; \<br> op monitor interval=&quot;10s&quot; timeout=&quot;30s&quot; \<br></div> op stop interval=&quot;0&quot; timeout=&quot;30s&quot; migration-threshold=&quot;1&quot;</span></div>

<div><span></span> </div>
<div><span>I tried stopping the asterisk service using service asterisk stop. I repeated that for at least 4 times but the service keeps restarting on the same node<var></var></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> emmanuel segura &lt;<a href="mailto:emi2fast@gmail.com" target="_blank">emi2fast@gmail.com</a>&gt;<br>
<b><span style="FONT-WEIGHT:bold">To:</span></b> Tommy Cooper &lt;<a href="mailto:tomcooper83@yahoo.com" target="_blank">tomcooper83@yahoo.com</a>&gt;; The Pacemaker cluster resource manager &lt;<a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a>&gt; <br>
</div><div><div class="h5"><b><span style="FONT-WEIGHT:bold">Sent:</span></b> Monday, March 4, 2013 11:05 PM<br><b><span style="FONT-WEIGHT:bold">Subject:</span></b> Re: [Pacemaker] Cluster resources failing to move<br></div>
</div></font></div><br>

<div><div><div class="h5">From Suse Docs<br><br>
<h3>7.4.2. Cleaning Up Resources<span><a 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" rel="nofollow" target="_blank">¶</a></span></h3>

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