Bug 905656 - [broker-util] oo-accept-broker doesn't summarize errors and set return code
Summary: [broker-util] oo-accept-broker doesn't summarize errors and set return code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 1.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-29 21:28 UTC by Luke Meyer
Modified: 2017-03-08 17:34 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-02-28 19:09:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0582 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise 1.1.1 update 2013-03-01 00:05:18 UTC

Description Luke Meyer 2013-01-29 21:28:25 UTC
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 13:51:55 UTC
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 14:41:29 UTC
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 12:19:59 UTC
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-07 03:18:39 UTC
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 19:09:54 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.

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.