Skip to content

Commit

Permalink
Ignore exit 1 from grep when there are no buildnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
lbischof committed Aug 28, 2018
1 parent fdfc99e commit 53411f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/client/checks/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func runOcGetNodes(buildNodes bool) (string, error) {
if buildNodes {
buildNodes_grep_params = ""
}
out, err := exec.Command("bash", "-c", fmt.Sprintf("oc get nodes --show-labels | grep -v monitoring=false | grep %s purpose=buildnode | grep -v SchedulingDisabled", buildNodes_grep_params)).Output()
out, err := exec.Command("bash", "-c", fmt.Sprintf("oc get nodes --show-labels | grep -v monitoring=false | grep -v SchedulingDisabled | grep %s purpose=buildnode || test $? -eq 1", buildNodes_grep_params)).Output()
if err != nil {
msg := "Could not parse oc get nodes output: " + err.Error()
log.Println(msg)
Expand Down

0 comments on commit 53411f9

Please sign in to comment.