Skip to content

Commit

Permalink
log added for default network usage
Browse files Browse the repository at this point in the history
  • Loading branch information
libesz authored and Levovar committed Dec 13, 2018
1 parent 878d8ff commit 1a24bb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/danm/danm.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ func createInterfaces(args *skel.CmdArgs) error {
return fmt.Errorf("Pod manifest could not be parsed with error: %v", err)
}
extractConnections(cniArgs)
if len(cniArgs.interfaces) == 0 {
log.Println("ERROR: ADD: DANM cannot create interfaces for Pod:" + cniArgs.podId + " , because no network connections are defined in spec.metadata.annotation")
return fmt.Errorf("DANM cannot create interfaces for Pod:%s, because no network connections are defined in spec.metadata.annotation", cniArgs.podId)
if len(cniArgs.interfaces) == 1 && cniArgs.interfaces[0].Network == defaultNetworkName {
log.Println("WARN: ADD: no network connections for Pod: " + cniArgs.podId + " are defined in spec.metadata.annotation. Falling back to use: " + defaultNetworkName)
}
cniResult, err := setupNetworking(cniArgs)
if err != nil {
Expand Down

0 comments on commit 1a24bb2

Please sign in to comment.