mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-26 09:36:04 +00:00
Fail the container start if the network has been removed
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
committed by
Tibor Vass
parent
1f209fffd0
commit
737cddc85d
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user