Skip to content

Commit

Permalink
Merge pull request #14 from oscp/ignore_grep_exit_1
Browse files Browse the repository at this point in the history
Ignore exit 1 from grep when there are no buildnodes
  • Loading branch information
c0desurfer authored Aug 28, 2018
2 parents fdfc99e + 53411f9 commit c9d343e
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 c9d343e

Please sign in to comment.