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