Service level on-failure auto-restart policy?

Is there a way in v1.0.1 to set a service to have a restart-policy of on-failure, similar to the option for a container? The only options I see in the UI are always and never.

Always basically means that whenever the containers of the service fails, continually try to start a new container to achieve the scale that was requested of the service.

Is that what you’re looking for?

I have run into scenarios that had a bad upgrade and I was unable to fix the service so I had to delete and recreate it because it would start then stop then start again infinitely. I was wondering if there was a way to have it try to start X times and then just die if it can’t.

Hopefully that makes sense.

Same situation here. In case of application configuration errors or bad deployments it is not possible to see the container logs since Rancher is trying to restart it indefinitely. An option similar to the one used when running a stand-alone container (auto-restart on failure up to x times) will surely help.

Can either of you make an enhancement request?

What would you expect the state of teh service to be after it failed X number of times?

I think it would make sense to put the container in a stopped state if it failed, for example, 5 times.