libnetwork icon indicating copy to clipboard operation
libnetwork copied to clipboard

phantom ip/mac vlan network after a powercycle

Open rnataraja opened this issue 7 years ago • 13 comments

I am trying to address https://github.com/docker/libnetwork/issues/1743 as part of this PR.

There are two issues as part of this

  1. When a node is power cycled unplanned or dockerd goes through a restart (unplanned), swarm scope networks are not cleaned up, Infact they are recreated when the docker daemon starts. This recreate does not work as there is already a swarmScope network has been restored and uses the same uplink. FIX: there was an earlier PR that tackled this problem by simply deleting the network if its created with same ID. As per comments in that PR, it was preferred to re-use instead of delete. In this PR, I am trying to essentially re-use the same network ID.

  2. Even if the swarm Scope network can be recreated there is still a problem with config-only network. As there is an additional createNetwork after the docker daemon restarts. The endpoint count on the configOnly network becomes more than what it should be. Consider the case where node has been kicked out of swarm during this unplanned reboot and added back in. I believe a swarm scope network to its config-only network is a one to one mapping for a particular worker node. If thats not the case, then more work is required for this PR. But if that is the case, there is no real need to track the endpoint count. FIX: Upon deleteNetwork of a swarm scope network, the correspnding configOnly Network endpoint count is zeroed out essentially making configOnly network as deleteable.

rnataraja avatar Nov 06 '18 01:11 rnataraja

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "issue1743" [email protected]:rnataraja/libnetwork.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

GordonTheTurtle avatar Nov 06 '18 01:11 GordonTheTurtle

@fcrisciani what are your thoughts on these changes.

rnataraja avatar Nov 13 '18 00:11 rnataraja

is any progress about this PR?

swift1911 avatar Dec 26 '18 02:12 swift1911

still present in 18.09.1

Greatsamps avatar Jan 28 '19 19:01 Greatsamps

+1

itsgk92 avatar Feb 04 '19 11:02 itsgk92

still on 18.09.2

MalMen avatar Feb 26 '19 21:02 MalMen

+1

lukicsl avatar Apr 14 '19 13:04 lukicsl

@rnataraja still there ? :)

arkodg avatar Jun 21 '19 21:06 arkodg

thanks for driving this issue @rnataraja , I'll be taking this PR forward using https://github.com/docker/libnetwork/pull/2415

arkodg avatar Jul 10 '19 04:07 arkodg

thanks for driving this issue @rnataraja , I'll be taking this PR forward using #2415

Thanks @arkodg

rnataraja avatar Jul 10 '19 21:07 rnataraja

@arkodg @selansen this was carried in https://github.com/docker/libnetwork/pull/2415, which is now merged, so this one can be closed

thaJeztah avatar Aug 22 '19 08:08 thaJeztah

I am still seeing this Version: 24.0.4

Subscribed to watch for a fix.

IGitYou avatar Jul 15 '23 17:07 IGitYou

/cc @akerouanton

thaJeztah avatar Jul 16 '23 19:07 thaJeztah