Sanity-check ipam args to make diagnosis easier

This commit is contained in:
Bryan Boreham committed 2016-04-08 15:18:08 +01:00
1 parent e88e67f02c
commit 13f3ff15bd
1 file changed
+3
+3
View File
@@ -27,6 +27,9 @@ func (i *Ipam) Allocate(args *skel.CmdArgs) (*types.Result, error) {
conf = &ipamConf{}
}
containerID := args.ContainerID
if containerID == "" {
return nil, fmt.Errorf("Weave CNI Allocate: blank container name")
}
var ipnet *net.IPNet
if conf.Subnet == "" {