treat restarting containers as "not running"

thus preventing stale DNS & IPAM entries.

Fixes #1977
This commit is contained in:
Matthias Radestock committed 2016-02-20 10:59:47 +00:00
1 parent 5e761a62b0
commit e52abafc48
1 file changed
+1 -1
+1 -1
View File
@@ -97,7 +97,7 @@ func (c *Client) AddObserver(ob ContainerObserver) error {
func (c *Client) IsContainerNotRunning(idStr string) bool {
container, err := c.InspectContainer(idStr)
if err == nil {
return !container.State.Running
return !container.State.Running || container.State.Restarting
}
if _, notThere := err.(*docker.NoSuchContainer); notThere {
return true