Fail the container start if the network has been removed

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2015-10-19 14:59:23 -07:00
parent 82a8a14c4d
commit 8755920d0d
1 changed files with 1 additions and 5 deletions

View File

@ -894,11 +894,7 @@ func (container *Container) allocateNetwork() error {
for _, n := range settings {
if err := container.connectToNetwork(n, updateSettings); err != nil {
if updateSettings {
return err
}
// dont fail a container restart case if the user removed the network
logrus.Warnf("Could not connect container %s : %v", container.ID, err)
return err
}
}