Bug 1176649
| Summary: | jenkins-client reports a failure during JBoss application build, but the Jenkins build logs show that the build was a success | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Miheer Salunke <misalunk> | |
| Component: | ImageStreams | Assignee: | Jason DeTiberus <jdetiber> | |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 2.2.0 | CC: | adellape, bleanhar, dmace, erich, gpei, jdetiber, jialiu, jokerman, libra-onpremise-devel, misalunk, mmccomas, pep, pruan | |
| Target Milestone: | --- | Keywords: | Reopened | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | openshift-origin-cartridge-jenkins-client-1.25.1.1-1 | Doc Type: | Bug Fix | |
| Doc Text: |
When running the "git push" command for applications with a Jenkins Client cartridge, it was possible for developers to experience "502 Proxy Error" and "Deployment Halted" messages during the build process, even when the deployment actually succeeded. These messages were potentially confusing to developers trying to investigate the issue. This bug fix updates the Jenkins Client cartridge to use the Ruby Net::HTTP library to easily retry requests and correctly interpret responses. As a result, the Jenkins Client cartridge now gracefully handles errors and provides more informative messages. After applying this update, a cartridge upgrade is required.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1176651 (view as bug list) | Environment: | ||
| Last Closed: | 2015-04-06 17:06:03 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | 1176651, 1196617 | |||
| Bug Blocks: | ||||
|
Description
Miheer Salunke
2014-12-22 17:47:32 UTC
This should be duplicated with BZ#1125328, if not, pls reopen. *** This bug has been marked as a duplicate of bug 1125328 *** (In reply to Johnny Liu from comment #3) > This should be duplicated with BZ#1125328, if not, pls reopen. While related, it seems there are 2 bugs here: a) the jenkins-client side fails when it shouldn't (the build actually succeeds) b) the jenkins server generates ISEs I'm reopening this bz to track issue (a) here, editing the subject a bit to clarify, while Bug 1125328 currently focuses on (b). Comment #0 says this happens always (100% reproducible), which doesn't seem to be the case. Sometimes the poll that jenkins-client does will get a 50x error from the server, when in fact the build is progressing correctly. The reasons behind that response from the server are investigated in bug 1125328. When this happens, the jenkins_build script in jenkins-client will not detect it and try to parse the ISE output as normal JSON data (as if a 200 status code had been returned). This is because the script uses curl: def get_jobs_info jobs = `curl -s --insecure https://${JENKINS_USERNAME}:${JENKINS_PASSWORD}@#{@hostname}#{@job_url}/api/json` result = $? and curl's exit code will still be 0 (success) in this scenario. One option could be to use wget instead: wget produces an error exit code if the server returns an error HTTP code. Something like: jobs = `wget -q -O- --no-check-certificate https://${JENKINS_USERNAME}:${JENKINS_PASSWORD}@#{@hostname}#{@job_url}/api/json` but then this would result in jenkins_build exiting with an error code too - not sure that's what we want. Eric suggested doing a few retries in this scenario. Maybe a combination of wget instead of curl + retries would make the client more robust. Verify this bug with openshift-origin-cartridge-jenkins-client-1.25.1.1-1.el6op.noarch The client side report success when triggering jenkins build job on vhost plugin enabled node. Create jbosseap app with jenkins-client and trigger jenkins build. [root@broker app1]# git push Counting objects: 3, done. Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 254 bytes, done. Total 2 (delta 1), reused 0 (delta 0) remote: Executing Jenkins build. remote: remote: You can track your build at https://jj-yes.ose22-manual.com.cn/job/app1-build remote: remote: Waiting for build to schedule.......................................................Done remote: Waiting for job to complete.....................................................................................................................Done remote: SUCCESS remote: New build has been deployed. remote: ------------------------- remote: Git Post-Receive Result: success remote: Deployment completed with status: success To ssh://yes-app1-1.com.cn/~/git/app1.git/ 55853b1..4b4fb35 master -> master Tried jenkins build 3 times, got 502 error once during building in /var/log/httpd/openshift_log, the client side still could finish job successfully, so move this bug to verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0779.html |