<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: trebuchet ms,sans-serif; font-size: 10pt; color: #000000'>I just wanted to reiterate one thing that I think got lost at the bottom of my first response - might be helpful...<br><br>You don't need these colocation and order statements if you have the resources grouped. The group is a syntax shortcut for writing order and colocation statements so the group is enforcing an order of ip then asterisk and a colocation of asterisk with ip. The colocation you had originally looked like it was backwards too.<br><br><div><span name="x"></span>
<style>/* Style Definitions */p.MsoNormal, p.MsoAutoSig, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt;}@page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;}div.WordSection1 {page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><font size="2">Jake</font></p>
</div>
<span name="x"></span><br></div><hr id="zwchr"><div style="color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Tommy Cooper" <tomcooper83@yahoo.com><br><b>To: </b>pacemaker@oss.clusterlabs.org<br><b>Sent: </b>Tuesday, March 5, 2013 9:42:52 AM<br><b>Subject: </b>[Pacemaker] Fw: Fw: Fw: Cluster resources failing to move<br><br><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="right: auto;"><span style="right: auto;">Thank you all<var id="yui-ie-cursor"></var> for helping me, the problem appears to be solved <br style="right: auto;" class="yui-cursor"></span></div>
<div style="right: auto;"><br style="right: auto;"></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" size="2">----- Forwarded Message -----<br><b><span style="font-weight: bold;">From:</span></b> emmanuel segura <emi2fast@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Tommy Cooper <tomcooper83@yahoo.com>; The Pacemaker cluster resource manager <pacemaker@oss.clusterlabs.org> <br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 5, 2013 12:21 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Pacemaker] Fw: Fw: Cluster resources failing to move<br></font></div><br>
<div style="right: auto;" id="yiv1233195814">try with this<br><br><span style="right: auto;">
<div style="right: auto;" class="yiv1233195814im">primitive p_asterisk ocf:heartbeat:asterisk \<br><span class="yiv1233195814Apple-style-span">meta migration-threshold="1" \</span><br> params user="root" group="root" maxfiles="65536" \<br> op start interval="0" timeout="30s" \<br> op monitor interval="10s" timeout="30s" \<br></div> op stop interval="0" timeout="30s"</span><br><br>
<div style="right: auto;" class="yiv1233195814gmail_quote">2013/3/5 Tommy Cooper <span dir="ltr"><<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex; right: auto;" class="yiv1233195814gmail_quote">
<div style="right: auto;">
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div><span>This config did not work<br><span> </span></span></div>
<div style="right: auto;" class="yiv1233195814im">
<div style="right: auto;">primitive p_asterisk ocf:heartbeat:asterisk \<br> params user="root" group="root" maxfiles="65536" \<br> meta <span>migration-threshold="1" \</span><br> op start interval="0" timeout="30s" \<br> op monitor interval="10s" timeout="30s" \</div>
<div> </div></div>
<div>crm(live)configure# verify<br> error: text2role: Unknown role: Start<br> error: get_target_role: voip: Unknown value for target-role: Start<br> error: text2role: Unknown role: Start<br> error: get_target_role: voip: Unknown value for target-role: Start<br> error: text2role: Unknown role: Start<br> error: get_target_role: p_asterisk: Unknown value for target-role: Start<br>Errors found during check: config not valid<br></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 style="right: auto;" dir="ltr"><font style="right: auto;" face="Arial">
<div style="right: auto;" class="yiv1233195814im">----- Forwarded Message -----<br><b><span style="font-weight: bold;">From:</span></b> emmanuel segura <<a href="mailto:emi2fast@gmail.com" rel="nofollow" target="_blank">emi2fast@gmail.com</a>><br><b><span style="font-weight: bold;">To:</span></b> Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>>; The Pacemaker cluster resource manager <<a style="right: auto;" href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" target="_blank">pacemaker@oss.clusterlabs.org</a>> <br></div>
<div>
<div class="yiv1233195814h5"><b><span style="font-weight: bold;">Sent:</span></b> Monday, March 4, 2013 11:50 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Pacemaker] Fw: Cluster resources failing to move<br></div></div></font></div>
<div style="right: auto;">
<div style="right: auto;" class="yiv1233195814h5"><br>
<div style="right: auto;">it's should be<br><br><span style="right: auto;">
<div style="right: auto;">primitive p_asterisk ocf:heartbeat:asterisk \<br> params user="root" group="root" maxfiles="65536" \<br> meta <span>migration-threshold="1" \</span><br> op start interval="0" timeout="30s" \<br> op monitor interval="10s" timeout="30s" \<br></div> </span><br><br>
<div>2013/3/4 Tommy Cooper <span dir="ltr"><<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); 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>Is this the correct way to do it?</span></div>
<div><span></span> </div>
<div style="background-color: transparent; font-style: normal; font-family: times new roman,new york,times,serif; font-size: 16px;"><span>
<div>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></div> op stop interval="0" timeout="30s" migration-threshold="1"</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>----- Forwarded Message -----<br><b><span style="font-weight: bold;">From:</span></b> emmanuel segura <<a href="mailto:emi2fast@gmail.com" rel="nofollow" target="_blank">emi2fast@gmail.com</a>><br><b><span style="font-weight: bold;">To:</span></b> Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>>; The Pacemaker cluster resource manager <<a href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" target="_blank">pacemaker@oss.clusterlabs.org</a>> <br></div>
<div>
<div><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>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'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"><<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); 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 <<a href="mailto:jsmith@argotec.com" rel="nofollow" target="_blank">jsmith@argotec.com</a>><br><b><span style="font-weight: bold;">To:</span></b> Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>>; The Pacemaker cluster resource manager <<a href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" target="_blank">pacemaker@oss.clusterlabs.org</a>> <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>> From: "Tommy Cooper" <<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>><br>> To: <a href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" target="_blank">pacemaker@oss.clusterlabs.org</a><br></div>
<div>> Sent: Monday, March 4, 2013 3:51:03 PM<br></div>
<div>> 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>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>> ----- Forwarded Message -----<br>> From: Jake Smith <<a href="mailto:jsmith@argotec.com" rel="nofollow" target="_blank">jsmith@argotec.com</a>><br>> To: Tommy Cooper <<a href="mailto:tomcooper83@yahoo.com" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a>>; The Pacemaker cluster<br>> resource manager <<a href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" 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" rel="nofollow" target="_blank">tomcooper83@yahoo.com</a> ><br>> > To: <a href="mailto:pacemaker@oss.clusterlabs.org" rel="nofollow" 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/" rel="nofollow" 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" 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></div></div>> > Project Home: <a href="http://www.clusterlabs.org/" rel="nofollow" target="_blank">http://www.clusterlabs.org/</a><br>> >
Getting started:<br>> > <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>
<div><br>> > <br>> <br>> <br>> <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></div>> Project Home: <a href="http://www.clusterlabs.org/" rel="nofollow" target="_blank">http://www.clusterlabs.org/</a><br>> Getting started:<br>> <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><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>-- <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" 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>-- <br>esta es mi vida e me
la vivo hasta que dios quiera </div><br><br></div></div></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>-- <br>esta es mi vida e me la vivo hasta que dios
quiera </div>
<br><br></div></div></div><br>_______________________________________________<br>Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br>http://oss.clusterlabs.org/mailman/listinfo/pacemaker<br><br>Project Home: http://www.clusterlabs.org<br>Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br>Bugs: http://bugs.clusterlabs.org<br></div><br></div></body></html>