mirror of https://github.com/docker/docs.git
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:
parent
9dc65ca480
commit
e1daa7c47b
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue