Had a situation happen where my Rancher’s load balancer had its host crash. The load balancer didn’t move to another host. When I noticed and logged in, clicked restart on the load balancer it then moved to a new host. Is there a suggested way to have this happen automatically? For containers I can explicitly say how to do a healthcheck, there are no options for the LB.
There is an automatic health check configured for the load balancer, so you shouldn’t need to add one.
There are some use cases (when the container is stuck in initializing state), that might have not made the container “unhealthy” to cause it to move over, but there is a fix coming for that use case in an upcoming release.
Actually, based on your comments on the “Host failed but container not falling over”, it might be something else.
For either the load balancer or services that aren’t failing over, could you run these queries on the DB?
select health_state, state from instance where instance_id=<containerid> select * from service_event where instance_id=<containerid>; select * from healthcheck_instance_host_map where healthcheck_instance_id in (select id from healthcheck_instance where instance_id=<containerid>);
Note: We will be exposing the health state reporting in the API in the next release so that you won’t have to go into the DB to look for it.