Skip to content

IPAM plugin loading is broken in Windows starting from Docker 27.0.1 #50596

@olljanat

Description

@olljanat

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

  1. Build plugin go build
  2. Run plugin .\ipam-plugin.exe
  3. 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)
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions