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

Bug 1628968

Summary: Access to `oc cluster up` web console from other hosts requires /console otherwise it redirects to https://127.0.0.1:8443/console
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED EOL QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, jmatthew, jokerman, mfojtik, mmccomas, prkumar
Target Milestone: ---   
Target Release: 3.11.z   
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: 2019-07-02 09:29:05 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-09-14 14:28:40 UTC
Description of problem:
When browsers from other hosts access the web console of an `oc cluster up` server, the url must prefix with /console, otherwise it redirects to https://127.0.0.1:8443/console, which makes access fail

Version-Release number of selected component (if applicable):
oc v3.11.6

How reproducible:
Always

Steps to Reproduce:
1. # oc cluster up --image='brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-${component}:${version}' --public-hostname=10.8.250.232
2. Access https://10.8.250.232:8443 from other hosts
3. Access https://10.8.250.232:8443/console from other hosts

Actual results:
2. Redirect to https://127.0.0.1:8443/console, which makes access fail
3. Access succeeds

Expected results:
2. Access succeeds.

Additional info:
# oc get cm -n openshift-web-console webconsole-config -o yaml
...
{"kind":"WebConsoleConfiguration","apiVersion":"webconsole.config.openshift.io/v1","servingInfo":{"bindAddress":"0.0.0.0:8443","bindNetwork":"tcp4","certFile":"/var/serving-cert/tls.crt","keyFile":"/var/serving-cert/tls.key","clientCA":"","namedCertificates":null,"maxRequestsInFlight":0,"requestTimeoutSeconds":0},"clusterInfo":{"consolePublicURL":"https://10.8.250.232:8443/console/","masterPublicURL":"https://10.8.250.232:8443","loggingPublicURL":"","metricsPublicURL":"","logoutPublicURL":"","adminConsolePublicURL":""},"features":{"inactivityTimeoutMinutes":0,"clusterResourceOverridesEnabled":false},"extensions":{"scriptURLs":[],"stylesheetURLs":[],"properties":null}}
...

I know it shows "consolePublicURL":"https://10.8.250.232:8443/console/". But this should therefore require we must input with /console in address bar. Because, let's compare to ansible-installed OCP clusters, they also shows "consolePublicURL":"https://xxx:8443/console/", but access to them without /console CAN work well. So oc cluster up should address the problem. It quite confuses me a lot at the beginning.

Comment 1 Xingxing Xia 2018-10-15 08:44:24 UTC
*** Bug 1639143 has been marked as a duplicate of this bug. ***