Bug 821915 - Failure to provision Jenkins cartridge should return unique exit code
Failure to provision Jenkins cartridge should return unique exit code
Status: CLOSED WORKSFORME
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Lili Nader
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-15 14:27 EDT by Clayton Coleman
Modified: 2015-05-14 20:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 15:05:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2012-05-15 14:27:20 EDT
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 14:58:56 EDT
Hold on - might be my problem... testing.... testing....
Comment 2 Dan McPherson 2012-05-15 14:59:56 EDT
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 15:05:46 EDT
My bad, fixed.

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