Skip to content

Commit

Permalink
fix(cnivpc): return error when add pod network record failed (#40)
Browse files Browse the repository at this point in the history
* fix(cnivpc): return error when add pod network record failed

* chore: update logs

* chore: add ip in error log
  • Loading branch information
fioncat authored Aug 2, 2024
1 parent fc4bb78 commit 2f55a17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/cnivpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ func cmdAdd(args *skel.CmdArgs) error {

err = addPodNetworkRecord(podName, podNS, sandBoxId, pNet)
if err != nil {
ulog.Warnf("Record pod network info for %s/%s, sandbox: %s, error: %v", podName, podNS, sandBoxId, err)
ulog.Errorf("Record pod network info for %s/%s, sandbox: %s, ip: %s, error: %v", podName, podNS, sandBoxId, pNet.VPCIP, err)
return fmt.Errorf("failed to add pod network record: %v", err)
}
// Fill result routes
ulog.Infof("[Result]: %+v", result)
Expand Down

0 comments on commit 2f55a17

Please sign in to comment.