Bug 1171257 - Exit status is zero though oo-admin-cartridge failed to install the cartridge.
Summary: Exit status is zero though oo-admin-cartridge failed to install the cartridge.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1132299
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-05 18:43 UTC by Brenton Leanhardt
Modified: 2015-01-08 15:34 UTC (History)
9 users (show)

Fixed In Version: openshift-origin-node-util-1.32.2.1-1
Doc Type: Bug Fix
Doc Text:
Cause: oo-admin-catridge did not return proper exit status on cartridge installation failures. Consequence: Scripted cartridge installation may have failed silently. Fix: oo-admin-cartridge now only returns 0 if at least one cartridge installed properly. Result: Scripts installing a single cartridge may now handle installation failures properly.
Clone Of: 1132299
Environment:
Last Closed: 2015-01-08 15:34:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0019 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.3 bug fix and enhancement update 2015-01-08 20:33:24 UTC

Description Brenton Leanhardt 2014-12-05 18:43:06 UTC
+++ This bug was initially created as a clone of Bug #1132299 +++

Description of problem:
Exit status is zero though oo-admin-cartridge failed to install the cartridge.

Version-Release number of selected component (if applicable):
devenv_5100

How reproducible:
always

Steps to Reproduce:
1.SSH into instance and run following commands:
# oo-admin-cartridge --action install --source /tmp ; echo $?

Actual results:
# oo-admin-cartridge --action install --source /tmp ; echo $?
install failed for /tmp: Cartridge manifest.yml missing: '/tmp/metadata/manifest.yml'
installation failed
0

Expected results:
The exit status should not be zero since the install failed.

Additional info:

--- Additional comment from Zamir SUN on 2014-08-27 23:13:20 EDT ---

pull request https://github.com/openshift/origin-server/pull/5767

--- Additional comment from Jhon Honce on 2014-08-28 13:26:48 EDT ---

oo-admin-cartridge is expected to return 0 if at least one cartridge was installed.

Comment 3 Anping Li 2014-12-09 02:26:15 UTC
Verified and pass on puddle-2-2-2014-12-08
1) if installation failed, it return 1
[root@broker opt]# oo-admin-cartridge --action install --source /tmp ; echo $?
install failed for /tmp: Cartridge manifest.yml missing: '/tmp/metadata/manifest.yml'

Operation failed: some cartridge cannot be installed

1
2) if installation succeed, it return 0.
[root@broker ~]# oo-admin-cartridge --action install --source /tmp/phpliap/ ; echo $?
succeeded
0

Comment 5 errata-xmlrpc 2015-01-08 15:34:48 UTC
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-0019.html


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