mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #17187 from mavenugo/dopts
Fail the container start if the network has been removed
This commit is contained in:
commit
48147d287b
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue