Bug 1299095

Summary: oo-diagnostic error on broker No such file or directory - /etc/openshift/env/OPENSHIFT_BROKER_HOST
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: ocAssignee: Vu Dinh <vdinh>
Status: CLOSED ERRATA QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: high    
Version: 2.2.0CC: anli, aos-bugs, charles_sheridan, jkaur, jokerman, mmccomas, rthrashe, somalley, vdinh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-common-1.29.5.1-1.el6op Doc Type: Bug Fix
Doc Text:
Cause: Several lines of code which are intended to run on the node were added to a section of code that was only run on the broker only. Consequence: The node-related code failed as it was run on the broker. Fix: The node-related code is now separated into a different test that is run on the node instead of the broker. Result: The test case that is intended for the broker runs correctly without failure as it no longer contains node-related code.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-22 16:54:04 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 Ryan Howe 2016-01-15 22:48:31 UTC
Description of problem:

oo-diagnostic error on broker No such file or directory - /etc/openshift/env/OPENSHIFT_BROKER_HOST

As this file does not exist on broker


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

How reproducible:
100%

Steps to Reproduce:
1. Upgrade from 2.2.7 to 2.2.8
2. run oo-diagnostics 

Actual results:

FAIL: rescue in block in run_tests
error running test_broker_certificate: #<Errno::ENOENT: No such file or directory - /etc/openshift/env/OPENSHIFT_BROKER_HOST


Expected results:

Error not to show up on broker since this file is on the nodes. 


Additional info:


https://github.com/openshift/enterprise-server/blob/enterprise-2.2/common/bin/oo-diagnostics#L1378-L1448

Comment 1 Vu Dinh 2016-02-04 22:22:44 UTC
Hi Ryan,

That test_broker_certificate case is added to oo-diagnostics to run in the node only. It was not supposed to run on the broker. There is a code to check if it's a broker and it should skip that test. Unfortunately, the check code was incorrect and there is a PR to fix that on its way.

Thanks,
Vu

Comment 2 openshift-github-bot 2016-02-09 16:28:47 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/0ee0200df0c0167f99a07ba4e52e3af03fd180e5
Bug 1299095 - oo-diagnostic test_broker_certificate fails on broker

The 'test_broker_certificate' method in oo-diagnostics fails if it's run
on broker due to the fact the test will checking for a file that only
exists on node but not broker.

This is a regression issue as in PR 6275, several lines of code was added
which was intended to run on the node only. As a result, when the code was
run in the broker, the failure occurs. This commit will separate the code
for broker and node test into 2 separate tests: test_broker_certificate
and test_node_certificate.

Bug 1299095
Link <https://bugzilla.redhat.com/show_bug.cgi?id=1299095>

Signed-off-by: Vu Dinh <vdinh>

Comment 5 Rory Thrasher 2016-02-22 22:25:26 UTC
QE,

Can we verify that oo-diagnostics will run successfully from both the broker and a node?


Puddle: http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19

Thank you

Comment 6 Anping Li 2016-02-26 09:21:14 UTC
Verified and pass on puddle 2016-02-25.2

Comment 8 errata-xmlrpc 2016-03-22 16:54:04 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/RHSA-2016-0489.html