libnetwork
libnetwork copied to clipboard
Ensuring endpoint resources are freed even on delete failures
Came across a code path where we might not be releasing ip address assigned to an endpoint if we have a failure with deleteEndpoint. Even if there is a failure it is better to release the resource rather than holding them. This might lead to issues where ip never gets released even though the container has exited and the only way of recovery is a reload.
Signed-off-by: Abhinandan Prativadi [email protected]
LGTM
@mavenugo @abhinandanpb is this ready to go in?
Considering that now the sb.delete(true)
is always called with true, can we just remove the force flag?
The important thing to do while cleaning up is to be sure that all the error cases will leave a warning log and continue with the call processing. WDYT?
@fcrisciani I agree we should still log the error even on force.