Thank you for your responses, <br><br>I have added the migration-treshold on my mysqld ressource, when i kill or manually stop mysql on one node, there is not failover on the second node.<br>Also, when i look crm_mon --failcounts, i can see "mysqld: migration-threshold=<span style="color:rgb(255,0,0)">1000000</span> fail-count=1000000", so i don"t anderstand why migration-threshold not equal 2?<span style="color:rgb(255,0,0)"></span><br>
<br>Migration summary:<br>* Node node1:<br> mysqld: migration-threshold=1000000 fail-count=1000000<br>* Node node2:<br><br>Failed actions:<br> mysqld_monitor_10000 (node=node1, call=90, rc=7, status=complete): not running<br>
mysqld_stop_0 (node=node1, call=93, rc=1, status=complete): unknown error<br><br><br><br>configuration:<br><br>node node1 \<br> attributes standby="off"<br>node node2 \<br> attributes standby="off"<br>
primitive Cluster-VIP ocf:heartbeat:IPaddr2 \<br> params ip="x.x.x.x" broadcast="x.x.x.x" nic="eth0" cidr_netmask="21" iflabel="VIP1" \<br> op monitor interval="10s" timeout="20s" \<br>
meta is-managed="true"<br>primitive datavg ocf:heartbeat:LVM \<br> params volgrpname="datavg" exclusive="true" \<br> op start interval="0" timeout="30" \<br>
op stop interval="0" timeout="30"<br>primitive drbd_mysql ocf:linbit:drbd \<br> params drbd_resource="drbd-mysql" \<br> op monitor interval="15s"<br>primitive fs_mysql ocf:heartbeat:Filesystem \<br>
params device="/dev/datavg/data" directory="/data" fstype="ext3"<br>primitive mysqld lsb:mysqld \<br> op monitor interval="10s" timeout="30s" \<br> op start interval="0" timeout="120" \<br>
op stop interval="0" timeout="120" \<br> <span style="color:rgb(255,0,0)">meta target-role="Started" migration-threshold="2" failure-timeout="20s"</span><br>
group mysql datavg fs_mysql Cluster-VIP mysqld<br>ms ms_drbd_mysql drbd_mysql \<br> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"<br>
location master-prefer-node-1 Cluster-VIP 25: node1<br>colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master<br>order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start<br>property $id="cib-bootstrap-options" \<br>
dc-version="1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f" \<br> cluster-infrastructure="openais" \<br> expected-quorum-votes="2" \<br> stonith-enabled="false" \<br>
no-quorum-policy="ignore" \<br> last-lrm-refresh="1332425337"<br>rsc_defaults $id="rsc-options" \<br> resource-stickiness="100"<br><br><br><br><div class="gmail_quote">
2012/3/22 Andreas Kurz <span dir="ltr"><<a href="mailto:andreas@hastexo.com">andreas@hastexo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
On 03/22/2012 01:51 PM, coma wrote:<br>
> Ah yes thank you, the service status mysql is now monitored, but the<br>
> failover is not performed?<br>
<br>
</div>As long as local restarts are successful there is no need for a failover<br>
... there is migration-treshold to limit local restart tries.<br>
<br>
Regards,<br>
Andreas<br>
<br>
--<br>
Need help with Pacemaker?<br>
<a href="http://www.hastexo.com/now" target="_blank">http://www.hastexo.com/now</a><br>
<br>
><br>
><br>
><br>
> 2012/3/22 emmanuel segura <<a href="mailto:emi2fast@gmail.com">emi2fast@gmail.com</a> <mailto:<a href="mailto:emi2fast@gmail.com">emi2fast@gmail.com</a>>><br>
<div class="im">><br>
> sorry<br>
> I think you missed the op monitor operetion in your primitive definition<br>
><br>
><br>
><br>
> Il giorno 22 marzo 2012 11:52, emmanuel segura <<a href="mailto:emi2fast@gmail.com">emi2fast@gmail.com</a><br>
</div>> <mailto:<a href="mailto:emi2fast@gmail.com">emi2fast@gmail.com</a>>> ha scritto:<br>
<div class="im">><br>
> I think you missed the op monitor operetion you primitive definition<br>
><br>
> Il giorno 22 marzo 2012 11:33, coma <<a href="mailto:coma.inf@gmail.com">coma.inf@gmail.com</a><br>
</div>> <mailto:<a href="mailto:coma.inf@gmail.com">coma.inf@gmail.com</a>>> ha scritto:<br>
<div><div class="h5">><br>
> Hello,<br>
><br>
> I have a question about mysql service monitoring into a<br>
> MySQL HA cluster with pacemaker and DRBD,<br>
> I have set up a configuration to allow a failover between<br>
> two nodes, it work fine when a node is offline (or standby),<br>
> but i want to know if it is possible to monitor the mysql<br>
> service to perform a failover if mysql is stopped or<br>
> unavailable?<br>
><br>
> Thank you in advance for any response.<br>
><br>
> My crm configuration:<br>
><br>
> node node1 \<br>
> attributes standby="off"<br>
> node node2 \<br>
> attributes standby="off"<br>
> primitive Cluster-VIP ocf:heartbeat:IPaddr2 \<br>
> params ip="x.x.x.x" broadcast="x.x.x.x" nic="eth0"<br>
> cidr_netmask="21" iflabel="VIP1" \<br>
> op monitor interval="10s" timeout="20s" \<br>
> meta is-managed="true"<br>
> primitive datavg ocf:heartbeat:LVM \<br>
> params volgrpname="datavg" exclusive="true" \<br>
> op start interval="0" timeout="30" \<br>
> op stop interval="0" timeout="30"<br>
> primitive drbd_mysql ocf:linbit:drbd \<br>
> params drbd_resource="drbd-mysql" \<br>
> op monitor interval="15s"<br>
> primitive fs_mysql ocf:heartbeat:Filesystem \<br>
> params device="/dev/datavg/data" directory="/data"<br>
> fstype="ext3"<br>
> primitive mysqld lsb:mysqld<br>
> group mysql datavg fs_mysql Cluster-VIP mysqld<br>
> ms ms_drbd_mysql drbd_mysql \<br>
> meta master-max="1" master-node-max="1"<br>
> clone-max="2" clone-node-max="1" notify="true"<br>
> location master-prefer-node-1 Cluster-VIP 25: node1<br>
> colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master<br>
> order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start<br>
> property $id="cib-bootstrap-options" \<br>
><br>
> dc-version="1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f"<br>
> \<br>
> cluster-infrastructure="openais" \<br>
> expected-quorum-votes="2" \<br>
> stonith-enabled="false" \<br>
> no-quorum-policy="ignore" \<br>
> last-lrm-refresh="1332254494"<br>
> rsc_defaults $id="rsc-options" \<br>
> resource-stickiness="100"<br>
><br>
><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
</div></div>> <mailto:<a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>><br>
<div class="im">> <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:<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>
><br>
> --<br>
> esta es mi vida e me la vivo hasta que dios quiera<br>
><br>
><br>
><br>
><br>
> --<br>
> esta es mi vida e me la vivo hasta que dios quiera<br>
><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
</div>> <mailto:<a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>><br>
<div class="HOEnZb"><div class="h5">> <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>
><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://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
</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>