<div dir="ltr">I am using the default version of the ubuntu 12.04 ( keepalived <span style="color:rgb(51,51,51);font-family:Consolas,Inconsolata,Courier,monospace;font-size:11px;line-height:15.359375px;white-space:pre-wrap;background-color:rgb(248,248,255)">1:1.2.2-3ubuntu1). Maybe this issue is the root cause. I will try the latest keepalived.</span></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 7, 2013 at 6:11 PM,  <span dir="ltr"><<a href="mailto:Eric_E_Smith@dell.com" target="_blank">Eric_E_Smith@dell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><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" target="_blank">https://github.com/acassen/keepalived/issues/8</a><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#376092">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.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#376092"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#376092">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/" target="_blank">http://four-eyes.net/2013/01/haproxy-keepalived-the-free-ha-load-balancer/</a><span style="color:#376092"><u></u><u></u></span></span></p>

<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#376092"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></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:<a href="mailto:zhang.lei.fly@gmail.com" target="_blank">zhang.lei.fly@gmail.com</a>] <br>

<b>Sent:</b> Monday, May 06, 2013 7:55 PM<br><b>To:</b> Smith, Eric E<br><b>Cc:</b> <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br><b>Subject:</b> Re: [Openstack] keepalive can not check the haproxy is down.<u></u><u></u></span></p>

<div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Thanks Eric,<u></u><u></u></p><div><p class="MsoNormal">I have solve it after breaking down the group. <u></u><u></u></p></div><div><p class="MsoNormal">

<u></u> <u></u></p></div><div><p class="MsoNormal">1. the different netmask is typo. And it doesn't break the failover. <u></u><u></u></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?<u></u><u></u></p>

</div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></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:<u></u><u></u></p>

<div><div><p class="MsoNormal"><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><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></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""> 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><u></u><u></u></p>

<div><div><p class="MsoNormal"> <u></u><u></u></p><p style="margin-bottom:12.0pt;background:white"><span style="font-family:"Helvetica","sans-serif";color:#222222">Hi Guys,</span><u></u><u></u></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><u></u><u></u></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><u></u><u></u></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><u></u><u></u></p>

<p style="margin-bottom:12.0pt;background:white"><strong><span style="font-family:"Helvetica","sans-serif";color:#222222">node1 keepalived.conf</span></strong><u></u><u></u></p><div><div><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></pre>

<pre style="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><u></u><u></u></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><u></u><u></u></pre><p style="margin-bottom:12.0pt;background:white">

<strong><span style="font-family:"Helvetica","sans-serif";color:#222222">node2 keepalived.conf</span></strong><u></u><u></u></p><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></pre><pre style="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><u></u><u></u></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><u></u><u></u></pre>

</div><div><p class="MsoNormal">-- <u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Lei Zhang</span><u></u><u></u></p></div><div><p class="MsoNormal">

 <u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Blog: <a href="http://jeffrey4l.github.com" target="_blank">http://jeffrey4l.github.com</a></span><u></u><u></u></p>

</div><div><p class="MsoNormal">twitter/weibo: @jeffrey4l<u></u><u></u></p></div></div></div></div></div></div></div></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p>

</div><p class="MsoNormal">-- <u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Lei Zhang</span><u></u><u></u></p></div><div><p class="MsoNormal">

<u></u> <u></u></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><u></u><u></u></p>

</div><div><p class="MsoNormal">twitter/weibo: @jeffrey4l<u></u><u></u></p></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Lei Zhang</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div><font face="arial, sans-serif">Blog: </font><a href="http://jeffrey4l.github.io" target="_blank">http://jeffrey4l.github.io</a></div>

<div>twitter/weibo: @jeffrey4l</div></div>
</div>