On Tue, May 23, 2023 at 11:21:28AM +0200, Thomas Pedoussaut wrote:
> 
> On 23/05/2023 11:14, Matteo Piva wrote:
> > Seems that it's considered an expected behavior to consider
> > optimistically the server as UP
> > when leaving MAINT mode, even if the L4 health checks are not completed yet.

To be more precise, at boot time, servers start with one last point of
health. This makes sure they get a definitive verdict with the very first
health check. In parallel, maintenance stops health checks, so if you put
a server in maintenance before its first check, my take is that its check
is still in the same state so that when you leave maintenance, it is still
up with one last check to be performed. I could of course be proven wrong,
but that's what I have in mind with the operational status and the
administrative state which are two independent things.

> > I consider that a quite annoying feature, but maybe I'm approaching at this 
> > in a wrong way.
> > 
> > Waiting for others to comment such issue to better understand.
> I have the exact same issue. I'm inserting servers on the fly from info I
> get from my orchestration backend (AWS ECS), and they fail the first few
> requests before L7 checks flag them down.

I understand this, and others have the opposite case in fact, i.e. with
slow checks, they don't want to take ages to reinsert a previously disabled
server in the farm. Normally using the existing API you could forcefully
mark the server's check as down using this before leaving maintenance:

   set server <backend>/<server> health [ up | stopping | down ]

Doesn't it work to force it to down before leaving maintenance and wait
for it to succeed its checks ? That would give this to leave maintenance:

   set server blah health down; set server blah state ready

By the way that reminds me that a long time ago we envisioned a server
option such as "init-state down" but with the ability to add servers on
the fly via the CLI it seemed a bit moot precisely because you should be
able to do the above. But again, do not hesitate to tell me if I'm wrong
somewhere, my goal is not to reject any change but to make sure we're not
trying to do something that's already possible (and possibly not obvious,
I concede).

Willy

Reply via email to