<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:775756965;
        mso-list-type:hybrid;
        mso-list-template-ids:1391861784 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1384913237;
        mso-list-type:hybrid;
        mso-list-template-ids:-293970106 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Some time ago I exchanged a couple of posts with you here regarding Mysql active-active HA.<o:p></o:p></p><p class=MsoNormal>The best solution I found so far was the Mysql multi-master replication, also referred to as circular replication.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Basically I set up two nodes, both were capable of the master role, and the changes were immediately propagated to the other node.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But still I wanted to have a M/S approach, to have a RW master and a RO slave – mainly because I prefer to have a signle master VIP where my apps can connect to.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(In the first approach I configured a two node clone, and the master IP was always bound to one of the nodes)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I applied the following configuration:<o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>node db1 \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> attributes IP="10.100.1.31" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> attributes standby="off" db2-log-file-db-mysql="mysql-bin.000021" db2-log-pos-db-mysql="40730"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>node db2 \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> attributes IP="10.100.1.32" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> attributes standby="off"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>primitive db-ip-master ocf:heartbeat:IPaddr2 \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> params lvs_support="true" ip="10.100.1.30" cidr_netmask="8" broadcast="10.255.255.255" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op monitor interval="20s" timeout="20s" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> meta target-role="Started"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>primitive db-mysql ocf:heartbeat:mysql \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> params binary="/usr/bin/mysqld_safe" config="/etc/mysql/my.cnf" datadir="/var/lib/mysql" user="mysql" pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" test_passwd="XXXXX" <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> test_table="replicatest.connectioncheck" test_user="slave_user" replication_user="slave_user" replication_passwd="XXXXX" additional_parameters="--skip-slave-start" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op start interval="0" timeout="120s" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op stop interval="0" timeout="120s" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op monitor interval="30" timeout="30s" OCF_CHECK_LEVEL="1" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op promote interval="0" timeout="120" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> op demote interval="0" timeout="120"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>ms db-ms-mysql db-mysql \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> meta notify="true" master-max="1" clone-max="2" target-role="Started"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>colocation db-ip-with-master inf: db-ip-master db-ms-mysql:Master<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>property $id="cib-bootstrap-options" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> dc-version="1.1.5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> cluster-infrastructure="openais" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> expected-quorum-votes="2" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> stonith-enabled="false" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> no-quorum-policy="ignore"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>rsc_defaults $id="rsc-options" \<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> resource-stickiness="0"<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>The setup works in the basic conditions:<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>After the “first” startup, nodes start up as slaves, and shortly after, one of them is promoted to master.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>Updates to the master are replicated properly to the slave.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>Slave accepts updates, which is Wrong, but I can live with this – I will allow connect to the Master VIP only.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>If I stop the slave for some time, and re-start it, it will catch up with the master shortly and get into sync.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>I have, however a serious issue:<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>If I stop the current master, the slave is promoted, accepts RW queries, the Master IP is bound to it – ALL fine.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol;mso-fareast-language:ZH-CN'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='mso-fareast-language:ZH-CN'>BUT – when I want to bring the other node online, it simply shows: Stopped (not installed)<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Online: [ db1 db2 ]<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>db-ip-master (ocf::heartbeat:IPaddr2): Started db1<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> Master/Slave Set: db-ms-mysql [db-mysql]<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> Masters: [ db1 ]<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> Stopped: [ db-mysql:1 ]<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Node Attributes:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>* Node db1:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> + IP : 10.100.1.31<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> + db2-log-file-db-mysql : mysql-bin.000021<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> + db2-log-pos-db-mysql : 40730<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> + master-db-mysql:0 : 3601<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>* Node db2:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> + IP : 10.100.1.32<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Failed actions:<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'> db-mysql:0_monitor_30000 (node=db2, call=58, rc=5, status=complete): not installed<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>I checked the logs, and could not find a reason why the slave at db2 is not started.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Any IDEA Anyone ?<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Attila<o:p></o:p></span></p></div></body></html>