Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1047778

Summary: On OpenShift Enterprise 2.0 broker installation (not all-on-one), oo-diagnostics -v -w 1 fails with error running test_broker_certificate: #<NoMethodError: undefined method `scan' for nil:NilClass> [0m
Product: OpenShift Container Platform Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: NodeAssignee: Luke Meyer <lmeyer>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: bleanhar, jpazdziora, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 15:43: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 Jan Pazdziora (Red Hat) 2014-01-02 08:48:49 UTC
Description of problem:

On the broker machine of the OpenShift Enterprise 2.0 multihost installation, oo-diagnostics -v -w 1 fails with error

running test_broker_certificate: #<NoMethodError: undefined method `scan' for nil:NilClass>[0m

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

# rpm -qf /usr/sbin/oo-diagnostics
rubygem-openshift-origin-common-1.17.2.2-1.el6op.noarch

How reproducible:

Seen once, assume deterministic.

Steps to Reproduce:
1. Install OpenShift Enterprise 2.0 as multihost setup.
2. Run oo-diagnostics -v -w 1 on the broker machine.

Actual results:

INFO: running: test_broker_certificate
[31mFAIL: rescue in block in run_tests
error running test_broker_certificate: #<NoMethodError: undefined method `scan' for nil:NilClass>[0m
INFO: running: test_abrt_addon_python

Expected results:

No error.

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2014-01-02 08:50:06 UTC
The code seems to run

httpd -S 2> /dev/null

and then parse it.

On the broker-only machine, the output is

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   broker.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:14)
*:443                  broker.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:25)

On an all-on-one installation, the output is

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:443                  is a NameVirtualHost
         default server broker.example.com (/etc/httpd/conf.d/000001_openshift_origin_node.conf:25)
         port 443 namevhost broker.example.com (/etc/httpd/conf.d/000001_openshift_origin_node.conf:25)
                 alias localhost
         port 443 namevhost broker.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:26)
                 alias localhost
*:80                   is a NameVirtualHost
         default server broker.example.com (/etc/httpd/conf.d/000001_openshift_origin_node.conf:6)
         port 80 namevhost broker.example.com (/etc/httpd/conf.d/000001_openshift_origin_node.conf:6)
                 alias localhost
         port 80 namevhost broker.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:14)
                 alias localhost

The parsing regexp only seems to support the second output format.

Comment 4 Luke Meyer 2014-01-02 15:43:04 UTC
Thanks for explaining why we didn't see this all the time in our testing. It's already fixed (just not released yet) so I'll mark this a dupe, but this will help with testing.

*** This bug has been marked as a duplicate of bug 1040647 ***