Bug 1430628 - openshift_master_logging_public_url option didn't work
Summary: openshift_master_logging_public_url option didn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: ewolinet
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks: 1426536
TreeView+ depends on / blocked
 
Reported: 2017-03-09 07:19 UTC by Gaoyun Pei
Modified: 2017-07-24 14:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The example inventories was incorrect for the logging public master URL. Consequence: The loggingPublicURL was not being set as expected. Fix: Updated the example inventories to be accurate for the new logging role. Result: loggingPublicURL is correctly set as expected.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:03:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0903 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-04-12 22:45:42 UTC

Description Gaoyun Pei 2017-03-09 07:19:04 UTC
Description of problem:
Now installer would configure loggingPublicURL in master config for logging, defaults to be https://kibana.{{ openshift_master_default_subdomain }}, but with openshift_master_logging_public_url set in ansible inventory file, it was still using the default value.

Version-Release number of selected component (if applicable):
openshift-ansible-3.5.28-1.git.0.103513e.el7.noarch.rpm


How reproducible:
Always

Steps to Reproduce:
1. Set the following options in ansible inventory, start installation playbook

openshift_hosted_logging_deploy=true
openshift_master_logging_public_url=https://kibana.example.com
openshift_master_default_subdomain=0309-3cg.qe.rhcloud.com

ansible-playbook -i inventory_file /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml

Actual results:
[root@ip-172-18-13-207 ~]# grep -r "loggingPublicURL:" /etc/origin/master/master-config.yaml
  loggingPublicURL: https://kibana.0309-3cg.qe.rhcloud.com



Expected results:


Additional info:

Comment 1 ewolinet 2017-03-09 17:41:51 UTC
You are setting the incorrect value for the 'loggingPublicURL', it is confusing since it is a misnomer.

'openshift_master_logging_public_url' is used for redirecting users to authenticate with OCP when they first attempt to connect to Kibana if their request does not have a certificate and token attached to it.

I believe the variable you are meaning to set and test here is 'openshift_logging_kibana_hostname' or 'openshift_hosted_logging_hostname'.

Comment 2 Gaoyun Pei 2017-03-10 03:25:59 UTC
Hi Eric, thanks for your quick feedback!

I was following the guide in 
https://github.com/openshift/openshift-ansible/blob/openshift-ansible-3.5.28-1/inventory/byo/hosts.ose.example#L533 to test openshift_master_logging_public_url option. 

From the description about 'openshift_master_logging_public_url', installer will overwrite the default loggingPublicURL value once I set openshift_master_logging_public_url to any other address, I was just verifying this point.

If loggingPublicURL in master config file was configured by specifying openshift_hosted_logging_hostname, could you please also update the example inventory file to clarify this thing?

Comment 5 Gaoyun Pei 2017-03-14 06:19:14 UTC
Checked with openshift-ansible-3.5.32-1.git.0.42cf266.el7.noarch.rpm, the option used to configure loggingPublicURL has been changed as openshift_hosted_logging_hostname in file /usr/share/doc/openshift-ansible-docs-3.5.32/docs/example-inventories/hosts.ose.example


# Configure loggingPublicURL in the master config for aggregate logging, defaults
# to https://kibana.{{ openshift_master_default_subdomain }}
#openshift_hosted_logging_hostname=https://kibana.example.com


Add openshift_hosted_logging_hostname=https://kibana.example.com in ansible inventory file, setup an ocp-3.5 cluster with logging deployment enabled.

After installation, check loggingPublicURL in master-config.yaml.
[root@ip-172-18-2-215 ~]# grep loggingPublicURL /etc/origin/master/master-config.yaml
  loggingPublicURL: https://https://kibana.example.com

Maybe what we want is like
loggingPublicURL: https://kibana.example.com

Comment 6 ewolinet 2017-03-14 14:50:52 UTC
I'll update the inventory example, the default does not begin with "https://", that is why we are seeing the duplicate "https://"

Comment 8 Scott Dodson 2017-03-15 18:24:19 UTC
Additional changes merged in openshift-ansible-3.5.34-1.git.0.2f1700a

Comment 9 Gaoyun Pei 2017-03-16 05:15:33 UTC
Verify this bug with openshift-ansible-3.5.35-1.git.0.7aa4728.el7.noarch

[root@gpei-test-ansible ~]# grep openshift_hosted_logging_hostname /usr/share/doc/openshift-ansible-docs-3.5.35/docs/example-inventories/hosts.ose.example
#openshift_hosted_logging_hostname=kibana.example.com
#openshift_hosted_logging_hostname=logging.apps.example.com


After setting openshift_hosted_logging_hostname=logging.apps.example.com in ansible inventory when deploying logging, check loggingPublicURL after installation.
[root@ip-172-18-14-187 ~]# grep loggingPublicURL /etc/origin/master/master-config.yaml
  loggingPublicURL: https://kibana.example.com

Comment 11 errata-xmlrpc 2017-04-12 19:03:39 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-2017:0903


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