Error from Engine when refresh doesn't pickup new container

Fix for https://github.com/docker/swarm/issues/1081
    Signed-off-by: Mariusz Borsa <mborsa@polyverse.io>
This commit is contained in:
mariusz 2015-07-31 11:03:04 -07:00
parent 9dc65ca480
commit e1daa7c47b
2 changed files with 5 additions and 5 deletions

View File

@ -425,7 +425,11 @@ func (e *Engine) Create(config *ContainerConfig, name string, pullImage bool) (*
e.RLock()
defer e.RUnlock()
return e.containers[id], nil
justCreated := e.containers[id]
if justCreated == nil {
err = errors.New("Container created but refresh didn't report it back")
}
return justCreated, err
}
// RemoveContainer a container from the engine.

View File

@ -130,10 +130,6 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string,
return nil, err
}
if container == nil {
return nil, errors.New("Container created but refresh didn't report it back")
}
st := &state.RequestedState{
ID: container.Id,
Name: name,