"Start Once" container looks healthy after exiting with error

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?

(Separate post, since new users can only add one image per post)

What the status service looks like:

I’m seeing this as well. I would expect the service to be marked as degraded or some other indication that the script failed.

I think it’s saved somewhere in the database but we do not currently expose the exit code or change the state based on it.

Thanks, I appreciate the response!