Bug 1171257

Summary: Exit status is zero though oo-admin-cartridge failed to install the cartridge.
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.2.0CC: anli, jhonce, jokerman, libra-bugs, libra-onpremise-devel, lxia, mmccomas, ofayans, sztsian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: 1132299 Environment:
Last Closed: 2015-01-08 15:34:48 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:
Bug Depends On: 1132299    
Bug Blocks:    

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