From 2418f257675807e5ae578137af48a2622797b746 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Mon, 10 Apr 2017 09:06:09 -0700 Subject: [PATCH] Do not error out on serv bind deactivation if no sbox is found - If the nw sbox is not there, then there is nothing to deactivate. Signed-off-by: Alessandro Boch --- daemon/container_operations.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/container_operations.go b/daemon/container_operations.go index db3c7e8518..82ca4701af 100644 --- a/daemon/container_operations.go +++ b/daemon/container_operations.go @@ -1072,7 +1072,9 @@ func (daemon *Daemon) DeactivateContainerServiceBinding(containerName string) er } sb := daemon.getNetworkSandbox(container) if sb == nil { - return fmt.Errorf("network sandbox does not exist for container %s", containerName) + // If the network sandbox is not found, then there is nothing to deactivate + logrus.Debugf("Could not find network sandbox for container %s on service binding deactivation request", containerName) + return nil } return sb.DisableService() }