Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 905656 - [broker-util] oo-accept-broker doesn't summarize errors and set return code
[broker-util] oo-accept-broker doesn't summarize errors and set return code
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
1.0.1
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Luke Meyer
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-29 16:28 EST by Luke Meyer
Modified: 2017-03-08 12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The previous version of oo-accept-broker did not summarize the total errors, and it did not set a return code equal to the number of errors. This has been fixed in the current version of oo-accept-broker. A summary of total errors, and a return code equal to the number of errors is now returned.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-28 14:09:54 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0582 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise 1.1.1 update 2013-02-28 19:05:18 EST

  None (edit)
Description Luke Meyer 2013-01-29 16:28:25 EST
Description of problem:
oo-accept-broker is supposed to give a summary of the number of errors and set a return code equal to the number of errors. It used to. Somewhere along the way it stopped doing that. Just prints the errors.

Version-Release number of selected component (if applicable):
openshift-origin-broker-util-1.0.14-1.el6op.noarch

Steps to Reproduce:
1. Run oo-accept-broker on a system with something wrong with it (e.g. stop activemq)
  
Actual results:
# oo-accept-broker
FAIL: Did not get expected HTTP 200 response from https://localhost/broker/rest/cartridges
# echo $?
0

Expected results:
# oo-accept-broker
FAIL: Did not get expected HTTP 200 response from https://localhost/broker/rest/cartridges
1 ERRORS
# echo $?
1

Additional info:
Probably something I did.
Comment 3 Luke Meyer 2013-02-05 08:51:55 EST
Fixed with openshift-origin-broker-util-1.0.15-1 and in origin as well - https://github.com/openshift/origin-server/pull/1308
Comment 4 openshift-github-bot 2013-02-05 09:41:29 EST
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/ab4ccb050969fdf1d9c21334a04ffe8336d93be3
<oo-accept-broker> fix bug 905656 - exit message and status
Comment 5 xjia 2013-02-06 07:19:59 EST
Wait new puddle to test;
For the puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-02-04.1/

[root@broker ~]# rpm -qa | grep openshift-origin-broker-util
openshift-origin-broker-util-1.0.12-1.el6op.noarch
Comment 6 xjia 2013-02-06 22:18:39 EST
Version:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-02-06.2/
openshift-origin-broker-util-1.0.15-1.el6op.noarch

Verify:
[root@broker ~]# service mongod status
mongod is stopped
[root@broker ~]# oo-accept-broker
FAIL: LOCAL: mongod service not running
exception: connect failed
FAIL: error logging into mongo db: localhost:27017/openshift_broker --username openshift, exit code: 1
FAIL: Did not get expected HTTP 200 response from https://localhost/broker/rest/application_templates
3 ERRORS
[root@broker ~]# echo $?
3
[root@broker ~]# service mongod start
Starting mongod:                                           [  OK  ]
[root@broker ~]# oo-accept-broker
PASS
[root@broker ~]# echo $?
0
Comment 8 errata-xmlrpc 2013-02-28 14:09:54 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0582.html

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