Merge pull request #3553 from zhuguihua/handle_error_when_executing_diff
handle_error_when_executing_diff
This commit is contained in:
commit
02e6424b32
1 changed files with 4 additions and 2 deletions
|
@ -636,8 +636,10 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: executing diff can return exit code != 0
|
diffOutput, err := exec.Command("diff", "-u", cfgPath, tmpfile.Name()).CombinedOutput()
|
||||||
diffOutput, _ := exec.Command("diff", "-u", cfgPath, tmpfile.Name()).CombinedOutput()
|
if err != nil {
|
||||||
|
klog.Warningf("Failed to executing diff command: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
klog.Infof("NGINX configuration diff:\n%v", string(diffOutput))
|
klog.Infof("NGINX configuration diff:\n%v", string(diffOutput))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue