Fix advanced options for backward compatibility#1963
Merged
silvin-lubecki merged 1 commit intodocker:masterfrom Jun 25, 2019
Merged
Fix advanced options for backward compatibility#1963silvin-lubecki merged 1 commit intodocker:masterfrom
silvin-lubecki merged 1 commit intodocker:masterfrom
Conversation
Member
Author
|
ping @wsong @andrewhsu @silvin-lubecki PTAL |
Codecov Report
@@ Coverage Diff @@
## master #1963 +/- ##
==========================================
+ Coverage 56.72% 56.73% +<.01%
==========================================
Files 310 310
Lines 21800 21803 +3
==========================================
+ Hits 12367 12370 +3
Misses 8518 8518
Partials 915 915 |
Member
Author
|
ping @tiborvass @andrewhsu @silvin-lubecki PTAL |
tiborvass
reviewed
Jun 24, 2019
| // and only a single network is specified, omit the endpoint-configuration | ||
| // on the client (the daemon will still create it when creating the container) | ||
| if i == 0 && len(copts.netMode.Value()) == 1 { | ||
| if ep == nil || reflect.DeepEqual(ep, &networktypes.EndpointSettings{}) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| if ep == nil || reflect.DeepEqual(ep, &networktypes.EndpointSettings{}) { | |
| if ep == nil || reflect.DeepEqual(*ep, networktypes.EndpointSettings{}) { |
For backward compatibility: if no custom options are provided for the network, and only a single network is specified, omit the endpoint-configuration on the client (the daemon will still create it when creating the container) This fixes an issue on older versions of legacy Swarm, which did not support `NetworkingConfig.EndpointConfig`. This was introduced in 5bc0963 (docker#1767) Signed-off-by: Sebastiaan van Stijn <[email protected]>
393c4f3 to
4d7e6bf
Compare
Member
Author
|
@tiborvass thanks! updated; ptal |
tiborvass
approved these changes
Jun 24, 2019
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.
For backward compatibility: if no custom options are provided for the network,
and only a single network is specified, omit the endpoint-configuration
on the client (the daemon will still create it when creating the container)
This fixes an issue on older versions of legacy Swarm, which did not support
NetworkingConfig.EndpointConfig.This was introduced in 5bc0963 (#1767)
fixes #1854
relates to docker-archive/classicswarm#2941