Do not use netns as ID or for entropy

ContainerID is now required so use that
or generate random bytes.

Fixes #5
This commit is contained in:
Eugene Yakubovich
2015-05-05 13:35:20 -07:00
parent ed97604e74
commit b2d9801b25
9 changed files with 90 additions and 49 deletions

View File

@ -48,9 +48,9 @@ func cmdAdd(args *skel.CmdArgs) error {
switch ipamConf.Type {
case "host-local":
ipConf, err = allocator.Get(args.Netns)
ipConf, err = allocator.Get(args.ContainerID)
case "host-local-ptp":
ipConf, err = allocator.GetPtP(args.Netns)
ipConf, err = allocator.GetPtP(args.ContainerID)
default:
return errors.New("Unsupported IPAM plugin type")
}
@ -81,5 +81,5 @@ func cmdDel(args *skel.CmdArgs) error {
return err
}
return allocator.Release(args.Netns)
return allocator.Release(args.ContainerID)
}