mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
bc32fcabeb
restart-condition for services from "on_failure" to "on-failure". Since GRPC does not support dashes in properties, this change added a conversion when _setting_ the restart-condition. However, when inspecting a service, no conversion took place from the internal GRPC value, resulting in "on_failure" to be shown. This change updates the conversion to fix this, and removes a "hack" that was previously used for this, now using a Switch to compare to actual types. Before this change: docker service create --name web --restart-condition=on-failure nginx:alpine docker service inspect --format '{{ json .Spec.TaskTemplate.RestartPolicy }}' web {"Condition":"on_failure","MaxAttempts":0} Afer this change: docker service create --name web --restart-condition=on-failure nginx:alpine docker service inspect --format '{{ json .Spec.TaskTemplate.RestartPolicy }}' web {"Condition":"on-failure","MaxAttempts":0} Signed-off-by: Kay Yan <kay.yan@daocloud.io> |
||
---|---|---|
.. | ||
container.go | ||
network.go | ||
node.go | ||
service.go | ||
swarm.go | ||
task.go |