Hello Willy,

I have tried to follow your advice, but it didn't solve the matter -- it looks 
like the problem is not the web interface.
After executing the code above, I use a different socket to retrieve the stats 
and check that the number of active servers corresponds to the expected one.
This is the log 


2012-03-14 10:50:56,568 Enabling reserves
2012-03-14 10:50:56,568 enable server www/i-932dbef7                            
        <-- command sent over the socket
2012-03-14 10:50:56,569 Expected 5 active serves, have 4, calling 
change_state() again
2012-03-14 10:50:56,569 enable server www/i-932dbef7                            
        <--- command sent over the socket
... server enabled

Cheers,
Michele


On Mar 10, 2012, at 10:16 AM, Willy Tarreau wrote:

> Hello Michele,
> 
> On Mon, Mar 05, 2012 at 03:41:20PM +0200, Michele Mazzucco wrote:
>> Hello everyone,
>> 
>> I think I might have tracked down the problem. 
>> According to the statistics I have retrieved by means of "show stat" after
>> enabling disabling servers, it looks like the socket is working as expected.
>> The might be in the web interface.
>> In my test, involving HAProxy 1.4.18 and 2 Apache servers being
>> enabled/disabled every 5 seconds, "show stat" was issued after every state
>> change (using a different socket) and reported the expected number of active
>> servers (i.e., either 0 or 2). On the other hand in a number of times the web
>> interface marked only 1 of the two serves in brown (MAINT).
> 
> Since your script sends the commands one at a time, it is fairly possible
> that the stats page refreshes between the two commands and only shows one
> server disabled.
> 
> I suggest that if you absolutely need to have them shut at the same time,
> then you disable them on the same command line which will be executed at
> once :
> 
>    disable server b1/s1 ; disable server b1/s2
>    enable server b1/s1 ; enable server b1/s2
> 
> Regards,
> Willy
> 


Reply via email to