Windows: Re-create custom NAT networks after restart if missing from HNS#43836
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jul 21, 2022
Merged
Windows: Re-create custom NAT networks after restart if missing from HNS#43836thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
cpuguy83
approved these changes
Jul 20, 2022
thaJeztah
approved these changes
Jul 21, 2022
| name := v.Name() | ||
| id := v.ID() | ||
|
|
||
| err = v.Delete() |
Member
There was a problem hiding this comment.
Just to be sure; would the ingress network also be in this list? If so, do we need to pass NetworkDeleteOptionRemoveLB as option?
Line 915 in 5de7704
Member
There was a problem hiding this comment.
Oh, I guess the ingress network wouldn't be v.Type() == "nat" ? If that's so, ignore my comment
Contributor
Author
There was a problem hiding this comment.
ingress is v.Type() == "overlay" so this does not affect those.
Member
There was a problem hiding this comment.
Thanks! Yes, I realised that after writing my first comment; thanks for confirming 👍
evol262
approved these changes
Jul 21, 2022
Member
|
alright, let's get this in! |
This was referenced Jul 24, 2022
Merged
This was referenced Jul 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Revisited on logic added by #20478 to correctly handle non-default NAT networks on Windows after server restart.
Closes #43408
- How I did it
Added logic which will re-create those networks with same settings after deleting orphan.
- How to verify it
Test binary can be found from https://filebin.net/t5nyuqjjx7un8lpd/dockerd.exe
However note that only networks which are not already missing/broken before switching to new binary version will works correctly because current behavior is that those networks get totally removed from Docker.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)