Bug 814444

Summary: [REST API] Return specific error code from server when Jenkins cart can't be added
Product: OKD Reporter: Clayton Coleman <ccoleman>
Component: PodAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: high    
Version: 1.xCC: dmcphers, kraman, rmillner, yquan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:59:39 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:

Description Clayton Coleman 2012-04-19 21:06:48 UTC
When the user attempts to add a Jenkins client without a Jenkins server, the REST API should return a unique exit code and clean message to the caller.  Currently the message from the server is:

Failed to add jenkins-client-1.4 to application test1 : Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.. Details : --DEBUG-- Cartridge return code: 151 --RESULT-- --MESSAGE-- --ERROR-- Jenkins server does not exist! Please create with rhc app create -t jenkins-1.4 --APP INFO-- --CART COMMANDS-- --DATA-- --EXIT CODE-- 151 

and the status code is 143 which is generic.  We should return 151 (if it's not reserved) and reserve it as "You cannot add a jenkins client until you add the jenkins server to the application".  We do not need the suggested application creation flow in the error - both the client and server can handle that.

We can't enable Jenkins in the UI until we have this.

Comment 1 Krishna Raman 2012-05-07 08:14:02 UTC
https://github.com/openshift/crankcase/pull/18

Comment 2 Krishna Raman 2012-05-07 16:36:07 UTC
https://github.com/openshift/crankcase/pull/21

Comment 3 yquan 2012-05-16 05:15:08 UTC
It is fixed in devenv_1778.