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:
- drainstops the member
- new application code is pushed to the server
- health check (make sure the new code responds to the URL specified in health monitor for the pool)
- re enable the member
- 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?