Ok, this is a little nit-picky, but when I set io.rancher.container.start_once: true on a container, it works fine but then the container is colored “red” in the UI after it exits. In my case, the stack is designed with a container that is supposed to come up, do some work, then exit. But marking it as “red” makes appear to have failed. Now, I’ll admit that I’m not 100% certain that the container in question actually returned a 0 when it exited. So let me know if Rancher already has a policy for like the one below…
What I’d like to see is something like this, if a container has start_once set to true:
if the container starts up and exits with “0”, then it’s color is blue even gray
if the container starts up and exits with - non-zero, mark it red, so I know to go check out the logs.
if it doesn’t start up properly, then also red
while it’s running, it should be green like the others.
The red dot on a container means that the container is stopped because in most cases, you’d want to know if the container has stopped. The icons shown next to the containers are based on the state of the container.
If you launch it within a service, even though the container has a red dot, the service should be in an active and green state to indicate all is well with the service.
Since the icon is dependent on the state of the container, Rancher would have to create a different state for each use case. If it’s something you feel passionate about, I’d recommend opening an issue in Github and outline your use cases/states/color icon. If enough people have the same requirements/feelings, we could look into adding it.