Hi Malcom,

The version tested comes from the debian package v 1.5.3-1~bpo70+1
haproxy -v
HA-Proxy version 1.5.3 2014/07/25
Copyright 2000-2014 Willy Tarreau <w...@1wt.eu>

Thanks for your help,
Smana



2014-08-22 18:47 GMT+02:00 Malcolm Turnbull <malc...@loadbalancer.org>:

> Smana,
>
> I don't get that result on my system, which build are you running?
>
> [root@lbmaster ~]# echo "show stat" | socat
> unix-connect:/var/run/haproxy.stat stdio
> #
> pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,
>
> L72,FRONTEND,,,0,0,40000,0,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,2,0,,,,0,0,0,0,,,,0,0,0,0,0,0,,0,0,0,,,0,0,0,0,,,,,,,,
> L72,backup,0,0,0,0,,0,0,0,,0,,0,0,0,0,no
> check,1,0,1,,,,,,1,2,1,,0,,2,0,,0,,,,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
>
> L72,RIP_Name,0,0,0,0,,0,0,0,,0,,0,0,0,0,UP,98,1,0,1,0,6303,0,,1,2,2,,0,,2,0,,0,L4OK,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
>
> L72,BACKEND,0,0,0,0,4000,0,0,0,0,0,,0,0,0,0,UP,98,1,1,,0,6303,0,,1,2,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
>
> stats,FRONTEND,,,0,2,2000,7,2797,102128,0,0,0,,,,,OPEN,,,,,,,,,1,3,0,,,,0,0,0,2,,,,0,6,0,1,0,0,,0,2,7,,,0,0,0,0,,,,,,,,
>
> stats,BACKEND,0,0,0,0,200,0,2797,102128,0,0,,0,0,0,0,UP,0,0,0,,0,6303,0,,1,3,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,32,,,0,0,0,2,
>
>
>
>
> On 22 August 2014 14:38, Smain Kahlouch <smain...@gmail.com> wrote:
>
>> Hello all,
>>
>> Maybe i misunderstood how the agent-check works.
>> Actually when i have a weight other than "100%" the server switches to
>> "DRAIN" state.
>>
>> In my current setup i just have a unique server working.
>>
>> echo 'show stat' | socat /var/run/haproxy/socket1 stdio | grep ^bk_global
>>
>> bk_global,cache1,0,0,0,0,,0,0,0,,0,,0,0,0,0,UP,1,1,0,0,0,864,0,,1,1,1,,0,,2,0,,0,L4OK,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
>> bk_global,cache2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,859,859,,1,1,2,,0,,2,0,,0,L4CON,,2998,0,0,0,0,0,0,0,,,,0,0,,,,,-1,No
>> route to host,No route to host,0,0,0,0,
>>
>> bk_global,BACKEND,0,0,0,0,6557,0,0,0,0,0,,0,0,0,0,UP,1,1,0,,0,864,0,,1,1,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
>>
>> The agent-check report "100%"
>> telnet 10.104.9.81 4242
>> Trying 10.104.9.81...
>> Connected to 10.104.9.81.
>> Escape character is '^]'.
>> 100%
>> Connection closed by foreign host.
>>
>> When i force the value to "90%",
>>
>> telnet 10.104.9.81 4242
>> Trying 10.104.9.81...
>> Connected to 10.104.9.81.
>> Escape character is '^]'.
>> 90%
>> Connection closed by foreign host.
>>
>> The status of the first server change to "DRAIN"
>> echo 'show stat' | socat /var/run/haproxy/socket1 stdio | grep ^bk_global
>>
>> bk_global,cache1,0,0,0,0,,0,0,0,,0,,0,0,0,0,DRAIN,0,1,0,0,0,1020,0,,1,1,1,,0,,2,0,,0,L4OK,,0,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
>> bk_global,cache2,0,0,0,0,,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,1015,1015,,1,1,2,,0,,2,0,,0,L4CON,,2999,0,0,0,0,0,0,0,,,,0,0,,,,,-1,No
>> route to host,No route to host,0,0,0,0,
>>
>> bk_global,BACKEND,0,0,0,0,6557,0,0,0,0,0,,0,0,0,0,DOWN,0,0,0,,0,1020,1020,,1,1,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
>>
>> Is this the expected behaviour ?
>>
>> Regards,
>> Smana
>>
>
>
>
> --
> Regards,
>
> Malcolm Turnbull.
>
> Loadbalancer.org Ltd.
> Phone: +44 (0)330 1604540
> http://www.loadbalancer.org/
>

Reply via email to