Skip to content

Commit

Permalink
Handler the parse config error before used
Browse files Browse the repository at this point in the history
(cherry picked from commit bd55c10)
  • Loading branch information
caoyingjunz authored and oilbeater committed May 9, 2021
1 parent 634f672 commit 91d43e0
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 91d43e0

Please sign in to comment.