提交 94e91d7f 编写于 作者: T Thomas Stromberg

Omit error message if 100-crio-bridge.conf has already been disabled

上级 e18b312f
......@@ -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)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册