Do not error out on serv bind deactivation if no sbox is found
| ... | ... |
@@ -1072,7 +1072,9 @@ func (daemon *Daemon) DeactivateContainerServiceBinding(containerName string) er |
| 1072 | 1072 |
} |
| 1073 | 1073 |
sb := daemon.getNetworkSandbox(container) |
| 1074 | 1074 |
if sb == nil {
|
| 1075 |
- return fmt.Errorf("network sandbox does not exist for container %s", containerName)
|
|
| 1075 |
+ // If the network sandbox is not found, then there is nothing to deactivate |
|
| 1076 |
+ logrus.Debugf("Could not find network sandbox for container %s on service binding deactivation request", containerName)
|
|
| 1077 |
+ return nil |
|
| 1076 | 1078 |
} |
| 1077 | 1079 |
return sb.DisableService() |
| 1078 | 1080 |
} |