-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phantom ip/mac vlan network after a powercycle #2295
base: master
Are you sure you want to change the base?
Changes from all commits
c1824b4
91cab66
bc68f38
766eac3
d8f0804
c994b5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1051,7 +1051,13 @@ func (n *network) delete(force bool, rmLBEndpoint bool) error { | |
|
||
if n.ConfigFrom() != "" { | ||
if t, err := c.getConfigNetwork(n.ConfigFrom()); err == nil { | ||
if err := t.getEpCnt().DecEndpointCnt(); err != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rnataraja |
||
// ConfigOnly and ConfigFrom Networks have 1 to 1 correspondence? In that case | ||
// there is no need to decrement the ref count, simply set it to zero. | ||
// In the case of a powercycle, the count on the configfrom network increments more than | ||
// once and this can cause the configfrom network to linger forever and not even deleteable. | ||
// This happens due to the additional increment after the power on, hence count can never | ||
// become zero. | ||
if err := t.getEpCnt().SetEndpointCnt(0); err != nil { | ||
logrus.Warnf("Failed to update reference count for configuration network %q on removal of network %q: %v", | ||
t.Name(), n.Name(), err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the re-create path, can you please add some integration test-cases, either in
libnetwork
ormoby
(https://github.com/moby/moby/blob/master/integration/network/service_test.go) . ASIGKILL
ondockerd
should be enough to reproduce this case