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

Bug 1579598

Summary: Public hostname provided by `oc cluster up --public-hostname` redirects to https://127.0.0.1:8443 and failed to be accessed
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, jliggitt, jokerman, mfojtik, mmccomas, rludva, wewang
Target Milestone: ---Keywords: Regression
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:16:09 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 Xingxing Xia 2018-05-18 02:07:38 UTC
Description of problem:
Public hostname provided by `oc cluster up --public-hostname` redirects to https://127.0.0.1:8443 and failed to be accessed
Checked webconsole-config configmap, it uses https://127.0.0.1:8443

Version-Release number of selected component (if applicable):
$ oc version
oc v3.10.0-0.47.0
...
Server https://10.8...:8443
openshift v3.10.0-0.47.0
...

How reproducible:
Always

Steps to Reproduce:
1. In remote host, run:
oc cluster up --public-hostname=10.8... --image='brew-.../openshift3/ose-${component}:${version}' # single quotes
...
OpenShift server started.

The server is accessible via web console at:
    https://10.8...:8443

You are logged in as:
    User:     developer
    Password: <any value>

To login as administrator:
    oc login -u system:admin

2. In local browser, visit https://10.8...:8443, it goes to https://127.0.0.1:8443

3. Check config:
$ oc login -u system:admin
$ oc get cm webconsole-config -n openshift-web-console -o yaml
... "consolePublicURL":"https://127.0.0.1:8443/console/","masterPublicURL":"https://127.0.0.1:8443" ...


Actual results:
2. Cannot visit https://10.8...:8443
3. It uses 127.0.0.1.
If manually change consolePublicURL to use 10.8..., the browser can visit login page, but the login always redirects to login page.
If manually change masterPublicURL to use 10.8... as well, browser can visit and login to web console

Expected results:
Can visit https://10.8...:8443 successfully

Additional info:
cd openshift.local.clusterup/
grep masterPublicURL `find . -name "master-config.yaml"` # the master-config.yaml is good 'masterPublicURL: https://10.8...:8443'

Comment 1 Michal Fojtik 2018-05-21 09:22:21 UTC
Should be fixed in https://github.com/openshift/origin/pull/19741

Comment 2 Xingxing Xia 2018-05-22 01:47:52 UTC
Verified in oc v3.10.0-0.50.0. Now configmap uses public host name and that url can be accessed. Thx

Comment 4 errata-xmlrpc 2018-07-30 19:16:09 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://access.redhat.com/errata/RHBA-2018:1816