[main/vlan] Fix error handling for delegate IPAM plugin

Signed-off-by: Piotr Skamruk <piotr.skamruk@gmail.com>
This commit is contained in:
Piotr Skamruk 2021-01-14 15:46:34 +01:00
parent 48a97a7ad1
commit 075c5a0d67

View File

@ -152,7 +152,7 @@ func cmdAdd(args *skel.CmdArgs) error {
// run the IPAM plugin and get back the config to apply // run the IPAM plugin and get back the config to apply
r, err := ipam.ExecAdd(n.IPAM.Type, args.StdinData) r, err := ipam.ExecAdd(n.IPAM.Type, args.StdinData)
if err != nil { if err != nil {
return err return fmt.Errorf("failed to execute IPAM delegate: %v", err)
} }
// Invoke ipam del if err to avoid ip leak // Invoke ipam del if err to avoid ip leak