From e4a8ee278cf10e657e64af81572d4688f6143c02 Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Mon, 19 Oct 2015 14:59:23 -0700 Subject: [PATCH] Fail the container start if the network has been removed Signed-off-by: Madhu Venugopal Upstream-commit: 8755920d0d1b3ef0d094bd75b25018b06d19839a Component: engine --- components/engine/daemon/container_unix.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/engine/daemon/container_unix.go b/components/engine/daemon/container_unix.go index ef708c104e..2cda0402f1 100644 --- a/components/engine/daemon/container_unix.go +++ b/components/engine/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 } }