When a start once container runs and errors, exiting with a non-zero exit code, there is no indication that there was any issues and that the stack might not actually be healthy.
I’d expect at least the container to look unhealthy and possibly the stack to be degraded.
In this case the container is running migrations on the database, so its important to know that it worked correctly as part of a deploy.
Migration container
- Has label “io.rancher.container.start_once” : true.
- Is running rake:db migrate
- Currently errors connecting to DB
What the stack looks like in the UI after exiting with an error code:
Does anyone know if Rancher is actually capable of this but I’m missing something?
If not, anyone got any good ideas on a more robust, scale-able, way of running a set of migrations?