<div dir="ltr"><div><div>After clearing "<span style="font-family:courier new,monospace">meta target-role=Started" <span style="font-family:arial,helvetica,sans-serif">from p_ip_mys</span></span><span style="font-family:arial,helvetica,sans-serif">ql </span>and restarted both nodes, it was able to give me what I want. Final config:<br>
<span style="font-family:courier new,monospace">[root@modb2 ~]# crm configure show<br>node modb1.domain.tld<br>node modb2.domain.tld<br>primitive p_drbd_mysql ocf:linbit:drbd \<br> params drbd_resource=data \<br> op start timeout=90s interval=0 \<br>
op stop timeout=180s interval=0 \<br> op promote timeout=180s interval=0 \<br> op demote timeout=180s interval=0 \<br> op monitor interval=30s role=Slave \<br> op monitor interval=29s role=Master<br>primitive p_fs_mysql Filesystem \<br>
params device="/dev/drbd0" directory="/mysql" fstype=ext4 options=noatime \<br> op start timeout=60s interval=0 \<br> op stop timeout=180s interval=0 \<br> op monitor interval=60s timeout=60s<br>
primitive p_ip_mysql IPaddr2 \<br> params ip=172.16.45.113 cidr_netmask=24 \<br> op monitor interval=30s<br>primitive p_mysql lsb:mysql \<br> meta migration-threshold=3 \<br> op monitor interval=20s timeout=10s \<br>
op start timeout=120s interval=0 \<br> op stop timeout=120s interval=0<br>group g_mysql p_fs_mysql p_ip_mysql p_mysql \<br> meta migration-threshold=5<br>ms ms_drbd_mysql p_drbd_mysql \<br> meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true<br>
colocation c_mysql_on_drbd inf: g_mysql ms_drbd_mysql:Master<br>order o_drbd_before_mysql inf: ms_drbd_mysql:promote g_mysql:start<br>property cib-bootstrap-options: \<br> dc-version=1.1.10-14.el6-368c726 \<br> cluster-infrastructure="classic openais (with plugin)" \<br>
expected-quorum-votes=2 \<br> no-quorum-policy=ignore \<br> pe-warn-series-max=1000 \<br> pe-input-series-max=1000 \<br> pe-error-series-max=1000 \<br> cluster-recheck-interval=5min \<br> stonith-enabled=false \<br>
default-action-timeout=180s \<br> start-failure-is-fatal=false \<br> last-lrm-refresh=1406392123<br>rsc_defaults rsc-options: \<br> resource-stickiness=100<br>[root@modb2 ~]# </span><br><br></div>May I know why those "<span style="font-family:courier new,monospace">target-role=Started</span>" are added automatically?<br>
<br></div>Thanks,<br>Jef<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 27, 2014 at 12:42 AM, Cayab, Jefrey E. <span dir="ltr"><<a href="mailto:jcayab@gmail.com" target="_blank">jcayab@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>I'm trying to figure out why this doesn't work - main objective is, when mysql service fails on the 3rd time in the active node, all the resources should failover to the other node. Here's my configuration:<br>
<span style="font-family:courier new,monospace">[root@modb2 ~]# crm configure show<br>node modb1.domain.tld<br>node modb2.domain.tld<br>primitive p_drbd_mysql ocf:linbit:drbd \<br> params drbd_resource=data \<br> op start timeout=90s interval=0 \<br>
op stop timeout=180s interval=0 \<br> op promote timeout=180s interval=0 \<br> op demote timeout=180s interval=0 \<br> op monitor interval=30s role=Slave \<br> op monitor interval=29s role=Master<br>primitive p_fs_mysql Filesystem \<br>
params device="/dev/drbd0" directory="/mysql" fstype=ext4 options=noatime \<br> op start timeout=60s interval=0 \<br> op stop timeout=180s interval=0 \<br> op monitor interval=60s timeout=60s<br>
primitive p_ip_mysql IPaddr2 \<br> params ip=172.16.45.113 cidr_netmask=24 \<br> op monitor interval=30s \<br> meta target-role=Started<br>primitive p_mysql lsb:mysql \<br> meta migration-threshold=2 \<br> op monitor interval=20s timeout=10s \<br>
op start timeout=120s interval=0 \<br> op stop timeout=120s interval=0<br>group g_mysql p_fs_mysql p_ip_mysql p_mysql \<br> meta migration-threshold=5<br>ms ms_drbd_mysql p_drbd_mysql \<br> meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true<br>
colocation c_mysql_on_drbd inf: g_mysql ms_drbd_mysql:Master<br>order o_drbd_before_mysql inf: ms_drbd_mysql:promote g_mysql:start<br>property cib-bootstrap-options: \<br> dc-version=1.1.10-14.el6-368c726 \<br> cluster-infrastructure="classic openais (with plugin)" \<br>
expected-quorum-votes=2 \<br> no-quorum-policy=ignore \<br> pe-warn-series-max=1000 \<br> pe-input-series-max=1000 \<br> pe-error-series-max=1000 \<br> cluster-recheck-interval=5min \<br> stonith-enabled=false \<br>
default-action-timeout=180s \<br> start-failure-is-fatal=false<br>rsc_defaults rsc-options: \<br> resource-stickiness=100<br>[root@modb2 ~]#</span><br><br></div>Also, with the above configuration, if the active is modb1 and I shut it down, here's what I see in modb2:<br>
<span style="font-family:courier new,monospace">[root@modb2 ~]# crm_mon -1<br>Last updated: Sun Jul 27 00:00:57 2014<br>Last change: Sat Jul 26 23:45:15 2014 via cibadmin on modb1.domain.tld<br>Stack: classic openais (with plugin)<br>
Current DC: modb2.domain.tld - partition WITHOUT quorum<br>Version: 1.1.10-14.el6-368c726<br>2 Nodes configured, 2 expected votes<br>5 Resources configured<br><br><br>Online: [ modb2.domain.tld ]<br>OFFLINE: [ modb1.domain.tld ]<br>
<br> Resource Group: g_mysql<br> p_fs_mysql (ocf::heartbeat:Filesystem): Started modb2.domain.tld<br> p_ip_mysql (ocf::heartbeat:IPaddr2): Started modb2.domain.tld<br> <b>p_mysql (lsb:mysql): Stopped </b><br>
Master/Slave Set: ms_drbd_mysql [p_drbd_mysql]<br> Masters: [ modb2.domain.tld ]<br> Stopped: [ modb1.domain.tld ]<br>[root@modb2 ~]#</span><br><br></div>And if modb1 is back online, it takes back all the resources and starts them:<br>
<span style="font-family:courier new,monospace">[root@modb2 ~]# crm_mon -1<br>Last updated: Sun Jul 27 00:04:38 2014<br>Last change: Sat Jul 26 23:45:15 2014 via cibadmin on modb1.domain.tld<br>Stack: classic openais (with plugin)<br>
Current DC: modb2.domain.tld - partition with quorum<br>Version: 1.1.10-14.el6-368c726<br>2 Nodes configured, 2 expected votes<br>5 Resources configured<br><br><br>Online: [ modb1.domain.tld modb2.domain.tld ]<br><br> Resource Group: g_mysql<br>
p_fs_mysql (ocf::heartbeat:Filesystem): Started modb1.domain.tld <br> p_ip_mysql (ocf::heartbeat:IPaddr2): Started modb1.domain.tld <br> p_mysql (lsb:mysql): Stopped <br> Master/Slave Set: ms_drbd_mysql [p_drbd_mysql]<br>
Masters: [ modb1.domain.tld ]<br> Slaves: [ modb2.domain.tld ]<br>[root@modb2 ~]# <br>[root@modb2 ~]# <br>[root@modb2 ~]# crm_mon -1<br>Last updated: Sun Jul 27 00:04:57 2014<br>Last change: Sat Jul 26 23:45:15 2014 via cibadmin on modb1.domain.tld<br>
Stack: classic openais (with plugin)<br>Current DC: modb2.domain.tld - partition with quorum<br>Version: 1.1.10-14.el6-368c726<br>2 Nodes configured, 2 expected votes<br>5 Resources configured<br><br><br>Online: [ modb1.domain.tld modb2.domain.tld ]<br>
<br> Resource Group: g_mysql<br> p_fs_mysql (ocf::heartbeat:Filesystem): Started modb1.domain.tld <br> p_ip_mysql (ocf::heartbeat:IPaddr2): Started modb1.domain.tld <br> p_mysql (lsb:mysql): Started modb1.domain.tld <br>
Master/Slave Set: ms_drbd_mysql [p_drbd_mysql]<br> Masters: [ modb1.domain.tld ]<br> Slaves: [ modb2.domain.tld ]<br>[root@modb2 ~]#</span><br><br></div>Then when I check the configuration, the "target-role=Started" is added automatically:<br>
<span style="font-family:courier new,monospace">[root@modb2 ~]# crm configure show<br>node modb1.domain.tld<br>node modb2.domain.tld<br>primitive p_drbd_mysql ocf:linbit:drbd \<br> params drbd_resource=data \<br> op start timeout=90s interval=0 \<br>
op stop timeout=180s interval=0 \<br> op promote timeout=180s interval=0 \<br> op demote timeout=180s interval=0 \<br> op monitor interval=30s role=Slave \<br> op monitor interval=29s role=Master<br>primitive p_fs_mysql Filesystem \<br>
params device="/dev/drbd0" directory="/mysql" fstype=ext4 options=noatime \<br> op start timeout=60s interval=0 \<br> op stop timeout=180s interval=0 \<br> op monitor interval=60s timeout=60s<br>
primitive p_ip_mysql IPaddr2 \<br> params ip=172.16.45.113 cidr_netmask=24 \<br> op monitor interval=30s \<br> meta target-role=Started<br>primitive p_mysql lsb:mysql \<br> meta migration-threshold=3 <b>target-role=Started </b>\<br>
op monitor interval=20s timeout=10s \<br> op start timeout=120s interval=0 \<br> op stop timeout=120s interval=0<br>group g_mysql p_fs_mysql p_ip_mysql p_mysql \<br> meta migration-threshold=5<br>ms ms_drbd_mysql p_drbd_mysql \<br>
meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true<br>colocation c_mysql_on_drbd inf: g_mysql ms_drbd_mysql:Master<br>order o_drbd_before_mysql inf: ms_drbd_mysql:promote g_mysql:start<br>property cib-bootstrap-options: \<br>
dc-version=1.1.10-14.el6-368c726 \<br> cluster-infrastructure="classic openais (with plugin)" \<br> expected-quorum-votes=2 \<br> no-quorum-policy=ignore \<br> pe-warn-series-max=1000 \<br> pe-input-series-max=1000 \<br>
pe-error-series-max=1000 \<br> cluster-recheck-interval=5min \<br> stonith-enabled=false \<br> default-action-timeout=180s \<br> start-failure-is-fatal=false<br>rsc_defaults rsc-options: \<br> resource-stickiness=100<br>
[root@modb2 ~]# </span><br><br><br></div>Please advice on what commands/configuration I need to execute so to achieve my goal - failover the cluster to the other node on the 3rd mysql service failure.<br><br></div>Thank you.<br>
</div>Jef<br></div>
</blockquote></div><br></div>