Repository navigation
Networkallocator must make use of plugin-v2 apis - #1876
Conversation
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This is necessary for swarmkit to support cluster wide plugins, such as globally scoped network plugins. Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
|
Test result using weave managed plugin - |
| doneChan chan struct{} | ||
|
|
||
| // PluginGetter provides access to docker's plugin inventory. | ||
| PluginGetter plugingetter.PluginGetter |
There was a problem hiding this comment.
Does this need to be exported?
| _, err = pg.Get(name, driverapi.NetworkPluginEndpointType, plugingetter.Lookup) | ||
| } else { | ||
| _, err = plugins.Get(name, driverapi.NetworkPluginEndpointType) | ||
| } |
There was a problem hiding this comment.
What are the semantics of doing it like this? Does it mean that if we have a PluginGetter, we only support v2 plugins, and without a PluginGetter, only v1 plugins are supported? Or is there some compatibility mechanism built into pg.Get?
There was a problem hiding this comment.
Yes. that is the idea. But plugingetter actually does its work by querying the plugins package internally if it cannot find a corresponding managed plugin. I can actually remove the call to plugin-v1 package.
There was a problem hiding this comment.
Can you also update the other instances of this pattern in libnetwork? Eg. https://github.com/docker/libnetwork/blob/4da563bb06cc7e488047ddf3a20cde2f9d9928cc/controller.go#L1089
There was a problem hiding this comment.
FYI, the older pattern was necessary when plugins were experimental and both stable and experimental daemons had to work with plugins. Today, this is not necessary.
|
It looks like the unit test needs to be updated. |
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Current coverage is 54.85% (diff: 36.66%)@@ master #1876 diff @@
==========================================
Files 107 107
Lines 17608 17611 +3
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 9636 9660 +24
+ Misses 6792 6783 -9
+ Partials 1180 1168 -12
|
|
@aaronlehmann addressed your comments and the CI is green now. |
|
LGTM |
|
LGTM |
|
LGTM, nothing obviously wrong with it. |
- backport of moby#1876 commit: 7541809 commit: c6aacc7 commit: f250807 To handle the type deletion happened in docker/docker and not updated in swarmkit. The docker vendoring was needed due to a dependency on a method requested by libnetwork vendoring Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
- backport of moby#1876 commit: 7541809 commit: c6aacc7 commit: f250807 To handle the type deletion happened in docker/docker and not updated in swarmkit. The docker vendoring was needed due to a dependency on a method requested by libnetwork vendoring Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
- backport of moby#1876 commit: 7541809 commit: c6aacc7 commit: f250807 To handle the type deletion happened in docker/docker and not updated in swarmkit. The docker vendoring was needed due to a dependency on a method requested by libnetwork vendoring Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
This is a followup PR for #1867 and its companion docker PR moby/moby#30145 to resolve moby/moby#30024.
This PR carries
ping @aaronlehmann @anusha-ragunathan