Bug 1299095 - oo-diagnostic error on broker No such file or directory - /etc/openshift/env/OPENSHIFT_BROKER_HOST
oo-diagnostic error on broker No such file or directory - /etc/openshift/env/...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Vu Dinh
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-15 17:48 EST by Ryan Howe
Modified: 2016-03-22 12:54 EDT (History)
9 users (show)

See Also:
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 12:54:04 EDT
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)

  None (edit)
Description Ryan Howe 2016-01-15 17:48:31 EST
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 17:22:44 EST
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 11:28:47 EST
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@redhat.com>
Comment 5 Rory Thrasher 2016-02-22 17:25:26 EST
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 04:21:14 EST
Verified and pass on puddle 2016-02-25.2
Comment 8 errata-xmlrpc 2016-03-22 12:54:04 EDT
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

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