Bug 958437

Summary: oo-accept-broker - too many arguments when console.conf is not there
Product: OpenShift Container Platform Reporter: scollier
Component: NodeAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.1.1CC: bleanhar, jdetiber, libra-onpremise-devel, lmeyer, pruan, xjia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-broker-util-1.9.7-1.2 Doc Type: Bug Fix
Doc Text:
Cause: When openshift-console is not installed, /etc/openshift/console.conf does not exist when oo-accept-broker looks for it. Consequence: oo-accept-broker execution fails with error "/usr/sbin/oo-accept-broker: line 168: [: too many arguments" Fix: Workaround is to install openshift-console; it need not be configured or started. Upgrade to OSE 1.2 which includes openshift-origin-broker-util-1.9.7-1.2
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-09 19:50:20 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:

Description scollier 2013-05-01 13:13:29 UTC
Description of problem:
when verifying the broker with oo-accept-broker, it produces the following message if the openshift-console is not installed:

# oo-accept-broker 
/usr/sbin/oo-accept-broker: line 168: [: too many arguments

running oo-accept-broker with "sh -x":

+ CONSOLE_SECRET='Could not open config file /etc/openshift/console.conf: Permission denied - /etc/openshift/console.conf is not readable'
+ '[' Could not open config file /etc/openshift/console.conf: Permission denied - /etc/openshift/console.conf is not readable == nil ']'
/usr/sbin/oo-accept-broker: line 168: [: too many arguments


If "yum -y install openshift-console" then the message goes away.

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

# rpm -qa | grep openshift
rubygem-openshift-origin-dns-bind-1.0.2-1.el6op.noarch
rubygem-openshift-origin-common-1.0.2-1.el6op.noarch
rubygem-openshift-origin-controller-1.0.15-1.el6op.noarch
openshift-origin-broker-1.0.14-1.el6op.noarch
openshift-origin-broker-util-1.0.18-1.el6op.noarch
rubygem-openshift-origin-msg-broker-mcollective-1.0.5-1.el6op.noarch
rubygem-openshift-origin-auth-remote-user-1.0.5-1.el6op.noarch


How reproducible:
every time

  
Actual results:
/usr/sbin/oo-accept-broker: line 168: [: too many arguments

Expected results:
PASS

Additional info:

Comment 3 openshift-github-bot 2013-05-01 18:56:55 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/56ec43409161bc9c2d7d8c98dc7de9796e93d2dd
<oo-accept-broker> Bug 958437 - Making CONSOLE_SECRET check dependent on existence of CONSOLE_CONF

https://bugzilla.redhat.com/show_bug.cgi?id=958437

Only check CONSOLE_SECRET if the Console config is present on the
system, since there is no dependency on openshift-origin-console being
installed for broker-utils

Comment 4 xjia 2013-05-03 02:44:08 UTC
Version:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-05-02.1

Verify:
[root@broker ~]# rpm -qa | grep openshift | grep console
[root@broker ~]# oo-accept-broker
NOTICE: SELinux is Enforcing
NOTICE: SELinux is  Enforcing
PASS

Comment 6 errata-xmlrpc 2013-07-09 19:50:20 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/RHEA-2013-1031.html