-
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
Clean up --config-only networks after --config-from networks have ungracefully exited #2373
Clean up --config-only networks after --config-from networks have ungracefully exited #2373
Conversation
PTAL @thaJeztah @mavenugo |
3f4d080
to
c6a77b4
Compare
ping @euanh PTAL |
c6a77b4
to
a10c81b
Compare
@arkodg The fix looks good. Please redraft the commit message (
We have this information in the pull request discussion, but it's better to have it in the commit message as well so someone working on this code in future can easily figure out what your change is doing. |
👍 git history is what's being preserved; GitHub description will get lost |
Might want to double check the error-checks in |
👍 This is the |
ef6ee87
to
9753b22
Compare
Thanks; yes, I saw your comment, so had a quick peek at the changes; didn't have time to go through the whole logic, so thought a quick example to illustrate potential problems would be helpful Been bit by this more than once 😂 |
The endpoint count for --config-only networks was being incremented even when the respective --config-from inherited network failed to create a network This was due to a variable shadowing problem with err causing the deferred function to not execute correctly. Using the same err variable across the entire function fixes the issue Fixes: moby/moby#35101 Signed-off-by: Arko Dasgupta <[email protected]>
9753b22
to
eacb56d
Compare
@thaJeztah @euanh I went through all the |
@arkodg Yes, I think your commit fixes this problem correctly, but it's useful to be aware of the problem and the |
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.
+1 for getting this merged for the next version! Tnx @arkodg @thaJeztah |
full diff: moby/libnetwork@e7933d4...55685ba changes included: - moby/libnetwork#2382 Backporting PR 2069 to bump_18.09 - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress() - moby/libnetwork#2363 [18.09] align dependencies with engine 18.09 - moby/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors - moby/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks - backport of moby/libnetwork#2373 - fixes moby#35101 - moby/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: moby/libnetwork@e7933d4...55685ba changes included: - moby/libnetwork#2382 Backporting PR 2069 to bump_18.09 - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress() - moby/libnetwork#2363 [18.09] align dependencies with engine 18.09 - moby/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors - moby/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks - backport of moby/libnetwork#2373 - fixes moby/moby#35101 - moby/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 0a3767c7e9803f0a595a07b0548e99d60e861062 Component: engine
Only increment Endpoint count for --config-only networks when the respective --config-from inherited network has been successfully created
Fixes - moby/moby#35101 (comment)
Signed-off-by: Arko Dasgupta [email protected]