Bug 821915 - Failure to provision Jenkins cartridge should return unique exit code
Summary: Failure to provision Jenkins cartridge should return unique exit code
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-15 18:27 UTC by Clayton Coleman
Modified: 2015-05-15 00:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 19:05:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2012-05-15 18:27:20 UTC
When attempting to add a jenkins cartridge via the REST API when there is no jenkins server installed, the node fails and returns this chunk of error.

DEBUG: [#<MCollective::RPC::Result:0x7f7e0db571c8 @results={:statusmsg=>"OK", :sender=>"ip-10-85-2-221", :data=>{:exitcode=>0, :output=>"/usr/libexec/stickshift/cartridges/embedded/jenkins-client-1.4/info/hooks/deconfigure: line 38: /var/lib/stickshift/46b611049ead4531832be7111d048151//.env/JENKINS_URL: No such file or directory\n/usr/libexec/stickshift/cartridges/embedded/jenkins-client-1.4/info/hooks/deconfigure: line 39: /var/lib/stickshift/46b611049ead4531832be7111d048151//.env/JENKINS_USERNAME: No such file or directory\n/usr/libexec/stickshift/cartridges/embedded/jenkins-client-1.4/info/hooks/deconfigure: line 40: /var/lib/stickshift/46b611049ead4531832be7111d048151//.env/JENKINS_PASSWORD: No such file or directory\nCLIENT_RESULT: Jenkins client 1.4 has been removed from: test\n"}, :statuscode=>0}, @action="cartridge_do", @agent="libra">]

The site needs a unique exitcode to identify this failure and show the correct message to the user.  The broker is currently configured to pass exitcode back to the client, but it looks like the node is returning insufficient info.

Need this to make the UI report correctly in sprint 12.

Comment 1 Clayton Coleman 2012-05-15 18:58:56 UTC
Hold on - might be my problem... testing.... testing....

Comment 2 Dan McPherson 2012-05-15 18:59:56 UTC
This is what jenkins client does on configure:

if ! [ -f "$APP_HOME/.env/JENKINS_URL" ]
then
    client_error "Jenkins server does not exist!  Please create with rhc app create -t jenkins-1.4"
    exit 151
fi
if [ -f "$APP_HOME/.env/OPENSHIFT_CI_TYPE" ]
then
    client_error "Jenkins client already embedded in $application"
    exit 152
fi



The output above appears to be from the deconfigure which is returning 0 because there is no client left to remove.

Comment 3 Clayton Coleman 2012-05-15 19:05:46 UTC
My bad, fixed.


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