Bug 814444 - [REST API] Return specific error code from server when Jenkins cart can't be added
Summary: [REST API] Return specific error code from server when Jenkins cart can't be ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-19 21:06 UTC by Clayton Coleman
Modified: 2012-06-08 17:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:59:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.