Merge pull request #3553 from zhuguihua/handle_error_when_executing_diff

handle_error_when_executing_diff
This commit is contained in:
Kubernetes Prow Robot 2018-12-12 04:58:21 -08:00 committed by GitHub
commit 02e6424b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))