<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=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
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:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What version of keepalived are you using?  I found this online: </span><span style='font-family:"Calibri","sans-serif"'><a href="https://github.com/acassen/keepalived/issues/8">https://github.com/acassen/keepalived/issues/8</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>I would first try removing the check script and validating that failure works without the check script.  If that works you might need to update keepalived.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>Here’s a brief introduction I did a while back on using haproxy with keepalived as a load balancer (FWIW): </span><span style='font-family:"Calibri","sans-serif"'><a href="http://four-eyes.net/2013/01/haproxy-keepalived-the-free-ha-load-balancer/">http://four-eyes.net/2013/01/haproxy-keepalived-the-free-ha-load-balancer/</a><span style='color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Lei Zhang [mailto:zhang.lei.fly@gmail.com] <br><b>Sent:</b> Monday, May 06, 2013 7:55 PM<br><b>To:</b> Smith, Eric E<br><b>Cc:</b> openstack@lists.launchpad.net<br><b>Subject:</b> Re: [Openstack] keepalive can not check the haproxy is down.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Thanks Eric,<o:p></o:p></p><div><p class=MsoNormal>I have solve it after breaking down the group. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>1. the different netmask is typo. And it doesn't break the failover. <o:p></o:p></p></div><div><p class=MsoNormal>2. Why the group is unnecessary? When there are the two instances using the same check script , like this case, what's mean after grouping them?<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Mon, May 6, 2013 at 6:37 PM, <<a href="mailto:Eric_E_Smith@dell.com" target="_blank">Eric_E_Smith@dell.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I see you have different netmasks for the VIP on node1 vs. node2;  I would also try breaking them out of the vrrp_sync_group and validating at least 1 router will fail independently.  </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Openstack [mailto:<a href="mailto:openstack-bounces%2Beric_e_smith" target="_blank">openstack-bounces+eric_e_smith</a>=<a href="mailto:dell.com@lists.launchpad.net" target="_blank">dell.com@lists.launchpad.net</a>] <b>On Behalf Of </b>Lei Zhang<br><b>Sent:</b> Monday, May 06, 2013 3:07 AM<br><b>To:</b> <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br><b>Subject:</b> [Openstack] keepalive can not check the haproxy is down.</span><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica","sans-serif";color:#222222'>Hi Guys,</span><o:p></o:p></p><p style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica","sans-serif";color:#222222'>I am trying to use keepalive and haproxy to work together to improve the HA of the openstack. But I meet following<br>unexpected issue. </span><o:p></o:p></p><p style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica","sans-serif";color:#222222'>I expect that when the haproxy process is crashed on the MASTER node(checked by chk_haproxy), the second node<br>will take over the VIP. But when I stop the haproxy process, nothing is happened.<br>However, when stop the keepalived service, the VIP is set up on the node2 as expected. </span><o:p></o:p></p><p style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica","sans-serif";color:#222222'>So I think the root cause should be the chk_haproxy block. But I have no idea why it doesn't work. Does any body have<br>ideas?</span><o:p></o:p></p><p style='margin-bottom:12.0pt;background:white'><strong><span style='font-family:"Helvetica","sans-serif";color:#222222'>node1 keepalived.conf</span></strong><o:p></o:p></p><div><div><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>global_defs {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    lvs_id LVS_228</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'> </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_sync_group openstack_haproxy {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    group {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        v1</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        v2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_script chk_haproxy {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    script "killall -0 haproxy"</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interval 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    debug</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    weight 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_instance v1 {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interface eth0 </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    debug</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    state MASTER</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_router_id 1</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    priority 101</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_ipaddress {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        <a href="http://192.168.0.230/24" target="_blank">192.168.0.230/24</a></span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }    </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    track_script {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        chk_haproxy</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_instance v2 {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interface eth1 </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    state MASTER</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    debug</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_router_id 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    priority 101</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_ipaddress {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        <a href="http://10.1.0.30/16" target="_blank">10.1.0.30/16</a></span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }    </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    track_script {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        chk_haproxy</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><p style='margin-bottom:12.0pt;background:white'><strong><span style='font-family:"Helvetica","sans-serif";color:#222222'>node2 keepalived.conf</span></strong><o:p></o:p></p><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white;overflow:auto'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>global_defs {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    lvs_id LVS_229</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'> </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_sync_group openstack_haproxy {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    group {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        v1</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        v2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_script chk_haproxy {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    script "killall -0 haproxy"</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interval 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    weight 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_instance v1 {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interface eth0 </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    state BACKUP</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_router_id 1</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    priority 100</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_ipaddress {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        192.168.0.230</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }    </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    track_script {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        chk_haproxy</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>vrrp_instance v2 {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    interface eth1 </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    state BACKUP</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_router_id 2</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    priority 100</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    virtual_ipaddress {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        10.1.0.30</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }    </span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    track_script {</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>        chk_haproxy</span></code><o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:1.8pt;margin-bottom:0in;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>    }</span></code><o:p></o:p></pre><pre style='line-height:14.4pt;background:white'><code><span style='font-family:Consolas;color:#333333;border:solid #CCCCCC 1.0pt;padding:6.0pt;background:ghostwhite'>}</span></code><o:p></o:p></pre></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>-- <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Lei Zhang</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Arial","sans-serif"'>Blog: <a href="http://jeffrey4l.github.com" target="_blank">http://jeffrey4l.github.com</a></span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>twitter/weibo: @jeffrey4l<o:p></o:p></p></div></div></div></div></div></div></div></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Lei Zhang</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Blog: </span><a href="http://jeffrey4l.github.io" target="_blank">http://jeffrey4l.github.io</a><o:p></o:p></p></div><div><p class=MsoNormal>twitter/weibo: @jeffrey4l<o:p></o:p></p></div></div></div></div></body></html>