Bug 1317435

Summary: overcloud controller host domain is forced to HOST.localdomain in /etc/hosts
Product: Red Hat OpenStack Reporter: Martin Schuppert <mschuppe>
Component: openstack-tripleo-heat-templatesAssignee: Jiri Stransky <jstransk>
Status: CLOSED CURRENTRELEASE QA Contact: Arik Chernetsky <achernet>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0 (Kilo)CC: byount, christopher_dearborn, jobrowni, josorior, mburns, mcornea, rhel-osp-director-maint
Target Milestone: ---Keywords: ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 15:57:50 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:

Description Martin Schuppert 2016-03-14 09:17:39 UTC
Description of problem:

When try to change domain part of the overcloud using CloudDomain parameter like:

CloudDomain: example.com

Works for compute, ceph, ... but for controllers this is set static to  HOST.localdomain in puppet/controller-puppet.yaml

1381   hosts_entry:
1382     description: >
1383       Server's IP address and hostname in the /etc/hosts format
1384     value:
1385       str_replace:
1386         template: IP HOST.localdomain HOST

Required change to the above is :

template: "IP HOST.DOMAIN HOST"

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

How reproducible:
always

Steps to Reproduce:
1. change under cloud neutron/nova to use non default domain (e.g. example.com)
2. set `CloudDomain: example.com` in overcloud parameter file
3. deploy overcloud

Actual results:
controller hosts get set to `IP HOST.localdomain HOST` in /etc/hosts

Expected results:
controller hosts get set to `IP HOST.DOMAIN HOST` in /etc/hosts

Additional info:

As mentioned above correct for the other components:

$ grep -A 5 "hosts_entry:" puppet/*-puppet.yaml 
puppet/ceph-storage-puppet.yaml:  hosts_entry:
puppet/ceph-storage-puppet.yaml-    value:
puppet/ceph-storage-puppet.yaml-      str_replace:
puppet/ceph-storage-puppet.yaml-        template: "IP HOST.DOMAIN HOST"
puppet/ceph-storage-puppet.yaml-        params:
puppet/ceph-storage-puppet.yaml-          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephStorageHostnameResolveNetwork]}]}
--
puppet/cinder-storage-puppet.yaml:  hosts_entry:
puppet/cinder-storage-puppet.yaml-    value:
puppet/cinder-storage-puppet.yaml-      str_replace:
puppet/cinder-storage-puppet.yaml-        template: "IP HOST.DOMAIN HOST"
puppet/cinder-storage-puppet.yaml-        params:
puppet/cinder-storage-puppet.yaml-          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
--
puppet/compute-puppet.yaml:  hosts_entry:
puppet/compute-puppet.yaml-    description: >
puppet/compute-puppet.yaml-      Server's IP address and hostname in the /etc/hosts format
puppet/compute-puppet.yaml-    value:
puppet/compute-puppet.yaml-      str_replace:
puppet/compute-puppet.yaml-        template: "IP HOST.DOMAIN HOST"
--
puppet/controller-puppet.yaml:  hosts_entry:
puppet/controller-puppet.yaml-    description: >
puppet/controller-puppet.yaml-      Server's IP address and hostname in the /etc/hosts format
puppet/controller-puppet.yaml-    value:
puppet/controller-puppet.yaml-      str_replace:
puppet/controller-puppet.yaml-        template: IP HOST.localdomain HOST
--
puppet/swift-storage-puppet.yaml:  hosts_entry:
puppet/swift-storage-puppet.yaml-    value:
puppet/swift-storage-puppet.yaml-      str_replace:
puppet/swift-storage-puppet.yaml-        template: "IP HOST.DOMAIN HOST"
puppet/swift-storage-puppet.yaml-        params:
puppet/swift-storage-puppet.yaml-          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ObjectStorageHostnameResolveNetwork]}]}

Comment 1 Bryan Yount 2016-03-17 19:10:05 UTC
*** Bug 1318424 has been marked as a duplicate of this bug. ***

Comment 3 Mike Burns 2016-04-07 21:14:44 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 4 Juan Antonio Osorio 2016-05-12 10:30:08 UTC
Isn't this change addressed by this cherry-pick which is already in stable/liberty? https://review.openstack.org/#/c/261018

Comment 5 Chris Dearborn 2016-05-12 13:34:05 UTC
The good news is that this issue is fixed in OSP 8 GA in the Liberty code (/usr/share/openstack-tripleo-heat-templates/puppet/controller.yaml), so new installs with OSP8 will not hit this bug.  The bug does still exist in the kilo version of the files (/usr/share/openstack-tripleo-heat-templates/kilo/puppet/controller-puppet.yaml) though.  Not sure that it makes sense to spend any dev time fixing the kilo files in OSP 10, so I think this bug should be closed.