Forráskód Böngészése

Merge pull request #32479 from aboch/vnd

Do not error out on serv bind deactivation if no sbox is found
Sebastiaan van Stijn 8 éve
szülő
commit
129d1f7051
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      daemon/container_operations.go

+ 3 - 1
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()
 }