Description
I noticed as part of my IPAM plugin for Docker with Nomad integration testing that plugin is not correctly loaded in Windows.
Seems to be happening in all versions, including latest code in master branch starting from 27.0.1 (didn't found 27.0.0 binaries). 26.1.4 and older versions works fine.
Reproduce
- Build plugin
go build
- Run plugin
.\ipam-plugin.exe
- Try create network:
docker network create `
--driver nat `
--ipam-driver nomad-ipam `
--subnet 10.0.0.0/16 `
--gateway 10.0.0.1 `
containers
Engine debug log contains message nomad-ipam implements: IpamDriver but still this logic returns error message:
|
// Now that we resolved the plugin, try again looking up the registry |
|
id, caps = c.ipamRegistry.IPAM(name) |
|
if id == nil { |
|
return nil, nil, types.InvalidParameterErrorf("invalid ipam driver: %q", name) |
|
} |
What I was able to trace is that Linux always use plugin getter in this code, even when running binary manually and Windows does not.
|
if pg := c.GetPluginGetter(); pg != nil { |
|
_, err = pg.Get(name, ipamapi.PluginEndpointType, plugingetter.Lookup) |
|
} else { |
|
_, err = plugins.Get(name, ipamapi.PluginEndpointType) |
|
} |
Description
I noticed as part of my IPAM plugin for Docker with Nomad integration testing that plugin is not correctly loaded in Windows.
Seems to be happening in all versions, including latest code in master branch starting from 27.0.1 (didn't found 27.0.0 binaries). 26.1.4 and older versions works fine.
Reproduce
go build.\ipam-plugin.exeEngine debug log contains message
nomad-ipam implements: IpamDriverbut still this logic returns error message:moby/daemon/libnetwork/controller.go
Lines 1125 to 1129 in 8c5c253
What I was able to trace is that Linux always use plugin getter in this code, even when running binary manually and Windows does not.
moby/daemon/libnetwork/controller.go
Lines 1101 to 1105 in 8c5c253