diff --git a/VERSION b/VERSION index 5944e7c3e..176ae5d50 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.32 +0.7.33 diff --git a/cluster/calcium/create_container.go b/cluster/calcium/create_container.go index 19021469b..9e5158fb0 100644 --- a/cluster/calcium/create_container.go +++ b/cluster/calcium/create_container.go @@ -683,12 +683,17 @@ func (c *calcium) makeContainerOptions(index int, quota map[string]int, specs ty } } + restartPolicy := entry.RestartPolicy + maximumRetryCount := 3 + if restartPolicy == "always" { + maximumRetryCount = 0 + } hostConfig := &enginecontainer.HostConfig{ Binds: binds, DNS: dns, LogConfig: logConfig, NetworkMode: enginecontainer.NetworkMode(networkMode), - RestartPolicy: enginecontainer.RestartPolicy{Name: entry.RestartPolicy, MaximumRetryCount: 3}, + RestartPolicy: enginecontainer.RestartPolicy{Name: restartPolicy, MaximumRetryCount: maximumRetryCount}, CapAdd: engineslice.StrSlice(capAdd), ExtraHosts: entry.ExtraHosts, Privileged: entry.Privileged != "",