This repository was archived by the owner on Oct 13, 2023. It is now read-only.
[19.03 backport] Handle the error case when a container reattaches to the same network#279
Merged
andrewhsu merged 2 commits intodocker-archive:19.03from Jun 18, 2019
Conversation
added 2 commits
June 12, 2019 20:00
retries to attach to a network, it is already connected to Fixes - docker/for-linux#632 Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 871acb1) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 31e8fcc) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
This was referenced Jun 14, 2019
3 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
backport of moby#39137 for 19.03
fixes docker/for-linux#632
Signed-off-by: Arko Dasgupta [email protected]
- What I did
Made sure the Networks context is manipulated in the scenario when a container attempts to attach to an a network it is already connected to
- How I did it
When attaching to a network in
findAndAttachNetworkmake sure you return with an error when that network is already part ofcontainer.NetworkSettings.Networks- How to verify it
Followed the same steps in the issue and made sure it is resolved
- Description for the changelog
Fix an issue where connecting a container to a network it's already connected to removes its IP address.
- A picture of a cute animal (not mandatory but encouraged)