Don't stop unhealthy task

I would like only that swarm reports the task as unhealthy. I don’t want swarm to stop the task. There does not seem to be an service parameter for this. There are ‘restart-condition’; but that does not prevent swarm from stopping the unhealthy task.

For clustering persistent store, the ‘unhealthy’ status fits nicely for a member that is temporarily out of sync with other members. Restoration of connectivity or consensus would lead to resynchronization which can take time. Stopping the task is unproductive, but reporting ‘unhealthy’ status is accurate. At best, a restart won’t report ‘unhealthy’…it reports ‘starting’…Not the same.

Maybe the ‘–health-start-period’ is appropriate. But I worry it expires only moments before the member rejoins its cluster. But to rely on this, the container would be shutdown after some unhealthy period, and restarted.

For some services’ unhealthiness, shutting down an ‘unhealthy’ container seems wasteful and undesired.