Hi Willy,

On Mon, Dec 01, 2014 at 09:18:05AM +0900, Simon Horman wrote:
> On Wed, Nov 12, 2014 at 05:11:27PM +0900, Simon Horman wrote:
> > On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote:
> > > Hi Simon,
> > > 
> > > On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote:
> > > > disable starts a server in the disabled state, however setting the 
> > > > health
> > > > of an agent implies that the agent is disabled as well as the server.
> > > > 
> > > > This is a problem because the state of the agent is not restored if
> > > > the state of the server is subsequently updated leading to an
> > > > unexpected state.
> > > > 
> > > > For example, if a server is started disabled and then the server
> > > > state is set to ready then without this change show stat indicates
> > > > that the server is "DOWN (agent)" when it is expected that the server
> > > > would be UP if its (non-agent) health check passes.
> > > 
> > > Interesting case. I believe I caused it myself while trying to address
> > > a different case : health checks are disabled, only agent checks are
> > > enabled, and the server is disabled in the configuration. Could you
> > > please check that this use case still works properly with your patch ?
> > > I'd rather avoid to see the server continue to show up!
> > 
> > Thanks, will do.
> > 
> > I was aware you had done some work in this area but I wasn't entirely
> > sure what case you were trying to fix. Thanks for filling in that gap
> > in my knowledge.
> 
> Hi Willy,
> 
> I have tested the following scenario which I hope matches the one that you
> describe:
> 
> 1. Start haproxy with server disabled in config
> 2. Disable health checks using:
>    echo "disable health VIP_Name/RIP_Name" | socat ..
> 2. Enable server using:
>    echo "set server VIP_Name/RIP_Name state ready" | socat ...
> 
> 
> The results are as follows:
> 
> 1. With this patch applied and agent-check enabled
> 
>    Server status is reported as ""
> 
> 2. With this patch applied and agent-check not configured in config
> 
>    Server status is reported as ""
> 
> 3. Without this patch applied and agent-check enabled
> 
>    Server status is reported as "DOWN (agent)"
> 
> 4. With this patch applied and agent-check not configured in config
> 
>    Server status is reported as ""
> 
> 
> My working assumption is that unless the agent-check explicitly
> marks a backend as down then the backend should not be considered
> down due to the agent-check. This includes this scenario when the
> agent-check is not responding. This seems to be reflected in
> the implementation other than the area of HTTP statistics.
> 
> As both 1) and 2) are consistent with 4) it seems to me that this
> patch is correct in the context of the scenario you describe (assuming
> my test is correct).

This seems to have slipped through the cracks.
I'm wondering if we could revisit it and the other patch in this series.

Reply via email to