Skip to content

Commit

Permalink
Do not error out on serv bind deactivation if no sbox is found
Browse files Browse the repository at this point in the history
- If the nw sbox is not there, then there is nothing to deactivate.

Signed-off-by: Alessandro Boch <[email protected]>
  • Loading branch information
aboch committed Apr 10, 2017
1 parent 8fabe07 commit 2418f25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/container_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 2418f25

Please sign in to comment.