Forum Discussion

Hexate_10437's avatar
Hexate_10437
Icon for Nimbostratus rankNimbostratus
Sep 30, 2013

Force a health check before re enabling a pool member

I am currently writing a powershell script using iControl that iterates through each member in a pool, and i am trying to do the following:

 

  1. drainstops the member
  2. new application code is pushed to the server
  3. health check (make sure the new code responds to the URL specified in health monitor for the pool)
  4. re enable the member
  5. rinse, repeat for next pool member

I have most of this working thanks to the DevCentral docs, but the health check part is not working. In my testing, I expected that if i tried to re enable the pool member, and then check the status immediately after, it would tell me if the member was AVAILABILITY_GREEN or RED.

 

To test, I added some bad code to a member, to force a failure. Instead, when I try to re enable the pool member, the status shows as GREEN, then the pool member is enabled, and then some time later, it is marked down. To me, it behaves like the health check is not happening while the pool member is forced down, then when it is brought in, it uses the last known status (GREEN), and then the health check fires a few moments later and correctly marks it down. This is bad since my script has moved on to the next pool member thinking it was fine.

 

Is there a way to force a health check of the pool member while it is forced down to know that it is healthy, before I try to re enable it?

 

3 Replies

  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account

    I think that if you enable a pool member, a health check is initiated immediately and it will be marked down after (timeout) if it fails the health check.

     

    If it starts out as green, very likely, you have another health check on that pool that succeeds much faster (for instance ICMP) in addition to the deeper one that gets bad response.

     

    • Hexate_10437's avatar
      Hexate_10437
      Icon for Nimbostratus rankNimbostratus
      So that implies I will have to add a wait time to my script to allow another health check to occur after I make the box available, but before I enable it in the pool. I have done this, and it works well enough for now, but this will require me to extend the wait for environments with long warmup times.
  • You got the possibly to set a Timeout until the health check should be up for the first time. The parameter is named "Time Until up" and is placed in the advanced health check configuration. It seems to be enough if you set the value to 1 sec, if the health check succeed, the pool member will be enabled after the 1 sec.