New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider instance upgraded when health check passes for it #3294
Comments
Just would like to clarify, in my forum post, I mention that the state - in the UI - is "Initializing", not "Running", because it does not have a successful health check yet. |
@etlweather state in the UI is combination of the instance state and the health state. So instance is in Running state and healthcheck = initializing is represented as Initializing in the UI |
Ah, got it. |
It seems like this should be the default, if not only, behavior for a service with a healthCheck. |
@sangeethah @soumyalj it works the same way for startFirst=true and startFirst=false |
@alena1108 : Tested with 2 containers and healthcheck enabled, batch size 1 in the master. After an upgrade, the second container starts within 25s after the first one starts. It is not supposed to start until the first one is in healthy state
|
@soumyalj with the fix I've applied, even the first batch won't be upgraded till all instances are healthy. So steps to test will be:
|
Followed the above steps and verified in v1.1.0-dev5-rc2. |
Upgraded to rancher 1.1.0 and the behaviour is the same. I have one running instance for a service. I perform in service upgrade and the old instance gets stopped right after new instance enters in initializing state, not after it becomes green. Is there any setting that needs to be done for this to work ? |
@wstudios2009 same for me with rancher 1.1.0. |
@wstudios2009 @tcdev0 Are you using "Start before stop" or not for upgrading? The specific change that was made was that if you had 3 containers and performed an upgrade. Previously, we'd end up stopping all 3 old containers while all 3 new containers were stuck in initializing. Therefore the service would be completely down if your service was stuck in initializing/unhealthy. With the fix for this issue, we only stop 1 container and wait until the new container is active before moving on to remove the next old container and starting the next new container. |
@deniseschannon I use start_first: true in rancher-compose.yml. |
@wstudios2009 Do you have a health check on the services? Can you share your docker-compose.yml for the service? The old one and the new compose? |
Yes, the health check is a simple HTTP GET check and is also working (state is 'Initializing' until my app is started), here's my rancher-compose.yml:
Here is my docker-compose file (with some passwords and urls removed):
The only thing that changes between deployments in docker-compose.yml are the images versions and some non-related env variables (GIT_SHA, RELEASE etc.). |
This issue still exists in rancher 1.6.14. The old container gets stopped even when the new one is still in "Initializing" state. |
During the in service upgrade, when we chose startFirst=true, old instance gets destroyed right after the upgraded one comes up. Today we consider instance to be UP when it goes to Running state. For some applications Running state is not an indication of "up", health check should really be this indication.
The least we should do - make this option configurable.
@ibuildthecloud @vincent99
The text was updated successfully, but these errors were encountered: