Explorar o código

Merge pull request #17187 from mavenugo/dopts

Fail the container start if the network has been removed
Jess Frazelle %!s(int64=9) %!d(string=hai) anos
pai
achega
48147d287b
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      daemon/container_unix.go

+ 1 - 5
daemon/container_unix.go

@@ -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
 		}
 	}