libnetwork icon indicating copy to clipboard operation
libnetwork copied to clipboard

Ensuring endpoint resources are freed even on delete failures

Open abhi opened this issue 7 years ago • 4 comments

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]

abhi avatar Jul 24 '17 18:07 abhi

LGTM

fcrisciani avatar Jul 24 '17 20:07 fcrisciani

@mavenugo @abhinandanpb is this ready to go in?

fcrisciani avatar Aug 03 '17 20:08 fcrisciani

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 avatar Aug 09 '17 16:08 fcrisciani

@fcrisciani I agree we should still log the error even on force.

vieux avatar Aug 11 '17 00:08 vieux