Sanity-check ipam args to make diagnosis easier
This commit is contained in:
1 parent
e88e67f02c
commit
13f3ff15bd
1 file changed
+3
@@ -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 == "" {
|
||||
|
||||
Reference in new issue
Block a user