Skip to content

Commit

Permalink
Merge pull request #9505 from tstromberg/hush-flannel
Browse files Browse the repository at this point in the history
Omit error message if 100-crio-bridge.conf has already been disabled
  • Loading branch information
medyagh authored Oct 22, 2020
2 parents 05de825 + 94e91d7 commit 9248335
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/minikube/cni/flannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,14 @@ func (c Flannel) Apply(r Runner) error {

if driver.IsKIC(c.cc.Driver) {
conflict := "/etc/cni/net.d/100-crio-bridge.conf"
_, err := r.RunCmd(exec.Command("sudo", "mv", conflict, filepath.Join(filepath.Dir(conflict), "DISABLED-"+filepath.Base(conflict))))

_, err := r.RunCmd(exec.Command("stat", conflict))
if err != nil {
klog.Warningf("%s not found, skipping disable step: %v", conflict, err)
return nil
}

_, err = r.RunCmd(exec.Command("sudo", "mv", conflict, filepath.Join(filepath.Dir(conflict), "DISABLED-"+filepath.Base(conflict))))
if err != nil {
klog.Errorf("unable to disable %s: %v", conflict, err)
}
Expand Down

0 comments on commit 9248335

Please sign in to comment.