Bug 1655184

Summary: Director deployed OCP 3.11: openshift_master_cluster_hostname and openshift_master_cluster_public_hostname always get set to IP addresses
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-heat-templatesAssignee: Martin André <m.andre>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 14.0 (Rocky)CC: dbecker, ltomasbo, m.andre, mariel, mburns, morazi, racedoro
Target Milestone: rcKeywords: Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-9.0.1-0.20181013060900.el7ost Doc Type: Bug Fix
Doc Text:
OpenStack Director previously always used IP addresses for the `openshift_master_cluster_hostname` and `openshift_master_cluster_public_hostname` parameters, which caused host names from the `OpenShiftGlobalVariables` Heat parameter to be ignored. After this fix, the Director will use the host name if provided, and the IP addresses if no host name is provided.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:55:06 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 Marius Cornea 2018-11-30 21:40:10 UTC
Description of problem:

Director deployed OCP 3.11: openshift_master_cluster_hostname and openshift_master_cluster_public_hostname always get set to IP addresses. I am unable to set them to hostnames.

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-9.0.1-0.20181013060891.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy openshift overcloud with:

parameter_defaults:
  CloudName: public.openshift.localdomain
  PublicVirtualFixedIPs: [{'ip_address':'10.0.0.200'}]

  CloudNameInternal: internal.openshift.localdomain
  InternalApiVirtualFixedIPs: [{'ip_address':'172.17.1.200'}]

  CloudDomain: openshift.localdomain

  OpenShiftGlobalVariables:
    openshift_master_cluster_hostname: internal.openshift.localdomain
    openshift_master_cluster_public_hostname: public.openshift.localdomain
    openshift_master_default_subdomain: apps.openshift.localdomain

Actual results:
 [root@undercloud-0 stack]# grep openshift_master_cluster_hostname /var/lib/mistral/openshift/openshift/global_vars.yml 
openshift_master_cluster_hostname: 172.17.1.200
 [root@undercloud-0 stack]# grep openshift_master_cluster_public_hostname /var/lib/mistral/openshift/openshift/global_vars.yml 
openshift_master_cluster_public_hostname: 10.0.0.200


Expected results:
    openshift_master_cluster_hostname: internal.openshift.localdomain
    openshift_master_cluster_public_hostname: public.openshift.localdomain

Additional info:

Comment 1 Martin André 2018-12-03 12:57:44 UTC
Hey Luis, Marius patch was addressing https://bugzilla.redhat.com/show_bug.cgi?id=1655123. Marking this issue as NEW since no one has looked at it yet.

Comment 2 Luis Tomas Bolivar 2018-12-03 13:05:26 UTC
Thanks Martin! I mixed them!

Comment 3 Martin André 2018-12-04 17:00:09 UTC
Found the issue, we need to revert the combine on https://github.com/openstack/tripleo-heat-templates/blob/d295cd9/extraconfig/services/openshift-master.yaml#L292.

I'll propose a patch a bit later.

Comment 4 Martin André 2018-12-04 17:30:08 UTC
Proposed upstream fix at https://review.openstack.org/#/c/622455/, please test.

Comment 5 Marius Cornea 2018-12-05 02:35:00 UTC
(In reply to Martin André from comment #4)
> Proposed upstream fix at https://review.openstack.org/#/c/622455/, please
> test.

Worked in my test, thanks Martin!

Comment 20 errata-xmlrpc 2019-01-11 11:55:06 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/RHEA-2019:0045