Skip to content

Commit

Permalink
Handler the parse config error before used
Browse files Browse the repository at this point in the history
  • Loading branch information
caoyingjunz committed May 9, 2021
1 parent 47ef2ec commit bd55c10
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/daemon/cniserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ func CmdMain() {
klog.Infof(versions.String())
daemon.InitMetrics()
config, err := daemon.ParseFlags()
if err != nil {
klog.Fatalf("parse config failed %v", err)
}

if err := Retry(util.ChasRetryTime, util.ChasRetryIntev, initChassisAnno, config); err != nil {
klog.Fatalf("failed to annotate chassis id, %v", err)
}

if err != nil {
klog.Fatalf("parse config failed %v", err)
}

if err = daemon.InitMirror(config); err != nil {
klog.Fatalf("failed to init mirror nic, %v", err)
}
Expand Down

0 comments on commit bd55c10

Please sign in to comment.