mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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 <aboch@docker.com>
This commit is contained in:
parent
8fabe07982
commit
2418f25767
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue