Bug 1505684

Summary: The kibana should use cluster_public_hostname when openshift_logging_master_public_url is not set
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: InstallerAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Qiaoling Tang <qitang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.0CC: aos-bugs, clasohm, jcantril, jokerman, mmccomas, myllynen, spagno
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-29 14:36:36 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:
Bug Depends On: 1547944    
Bug Blocks:    
Attachments:
Description Flags
Inventory deploylogs deploymentconfig files none

Description Anping Li 2017-10-24 06:45:25 UTC
Created attachment 1342525 [details]
Inventory deploylogs deploymentconfig files

Description of problem:

When deploy the logging to HA Masters OCPs. If the openshift_logging_master_public_url is not set in inventory. The OAP_PUBLIC_MASTER_URL and OAP_LOGOUT_REDIRECT in kibana deploymentconfigure is set to the first master's public_hostname.  It should  use the cluster_public_hostname (The lb hostname ).

Version-Release number of the following components:
openshift-ansible-3.7.0-0.174.0

How reproducible:
always

Steps to Reproduce:
1. Install clustered masters OCP

[OSEv3:vars]
deployment_type=openshift-enterprise
openshift_master_cluster_method=native
openshift_master_cluster_hostname=master3.example.com


[masters]
master1.example.com
master2.example.com
master3.example.com

[lb]
master.example.com

2. Don't set openshift_logging_master_public_url in inventroy file and deploy logging via ansible playbook
   openshift_logging_install_logging=true
   #openshift_logging_master_public_url=https://master.example.com:8443

3. Check the deployconfig k
oc get dc logging-kibana -o yaml |egrep -A 1 'OAP_PUBLIC_MASTER_URL|OAP_LOGOUT_REDIRECT'

Actual results:
# OAP_PUBLIC_MASTER_URL and OAP_LOGOUT_REDIRECT was set to https://master1.example.com:8443
 oc get dc logging-kibana -o yaml |egrep -A 1 'OAP_PUBLIC_MASTER_URL|OAP_LOGOUT_REDIRECT'
        - name: OAP_PUBLIC_MASTER_URL
          value: https://master1.example.com:8443
        - name: OAP_LOGOUT_REDIRECT
          value: https://master1.example.com:8443/console/logout


Expected results:

#OAP_PUBLIC_MASTER_URL and OAP_LOGOUT_REDIRECT should be https://master.example.com:8443 when  openshift_logging_master_public_url is not set

Comment 2 Andrea Spagnolo 2018-02-13 23:06:42 UTC
Also in version 3.7.23

Comment 3 Anping Li 2018-02-23 01:28:18 UTC
@jeff, duplicated bug as https://bugzilla.redhat.com/show_bug.cgi?id=1547944, Could we merge it to v3.9.

Comment 6 Qiaoling Tang 2018-04-20 00:46:50 UTC
verified on openshift v3.7.44

Comment 11 errata-xmlrpc 2018-04-29 14:36:36 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/RHSA-2018:1231