Bug 1047934 - oo-diagnostics test_broker_certificate NoMethodError: undefined method scan for nil
Summary: oo-diagnostics test_broker_certificate NoMethodError: undefined method scan f...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 1.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1040647
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 15:46 UTC by Luke Meyer
Modified: 2017-03-08 17:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1040647
Environment:
Last Closed: 2014-01-02 22:12:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luke Meyer 2014-01-02 15:46:09 UTC
Duplicated because I believe this happens in 1.2 as well. 

+++ This bug was initially created as a clone of Bug #1040647 +++

Description of problem:
test_broker_certificate isn't quite reliable.

How reproducible:
Note root cause discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1047778

Steps to Reproduce:
1. Use openshift.sh to create separate OSE 1.2 broker (not all-in-1)
2. oo-diagnostics test_broker_certificate

Results:
FAIL: rescue in block in run_tests
error running test_broker_certificate: #<NoMethodError: undefined method `scan' for nil:NilClass>

Additional info:
The problem at least in this case was that this line returns nil:

  apacheconfig = `httpd -S 2> /dev/null`.slice(/^\*:443.*\n[[:space:]][^\n]*\n[^[:space:]]/m)

It's expecting httpd -S to return at least one line after the :443 match with a space and something else on it. In my case at least, it doesn't:

# httpd -S 2> /dev/null
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   broker.hosts.ose20.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:14)
*:443                  broker.hosts.ose20.example.com (/etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf:25)


Should be able to just cherry-pick the 2.0 fix.

Comment 3 Luke Meyer 2014-01-02 22:12:22 UTC
Actually... looking at the 1.2 code... it worked completely differently. Not a problem AFAICS. Closing this bug.


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