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

Bug 1336955

Summary: Specifying custom domain name for overcloud nodes does not work
Product: Red Hat OpenStack Reporter: Chris Dearborn <christopher_dearborn>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED CURRENTRELEASE QA Contact: Gurenko Alex <agurenko>
Severity: high Docs Contact:
Priority: high    
Version: 8.0 (Liberty)CC: arkady_kanevsky, aschultz, athomas, cdevine, christopher_dearborn, cllewellyn, dbecker, emacchi, gael_rehault, John_walsh, jslagle, kurt_hey, mburns, mcornea, morazi, randy_perryman, rhel-osp-director-maint, rsussman, sclewis, shardy, wayne_allen
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1532376 1532827 (view as bug list) Environment:
Last Closed: 2019-01-09 18:15:58 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:    
Bug Blocks: 1295530, 1305654, 1532376, 1532827    

Description Chris Dearborn 2016-05-17 21:37:50 UTC
Description of problem:
When you specify a custom domain name using the CloudDomain parameter, the overcloud nodes are deployed with a hostname that includes ".localdomain" and not the custom one specified.

Version-Release number of selected component (if applicable):
OSP-8

How reproducible:
Create a .yaml environment file containing:
parameter_defaults:
  CloudDomain: thedomain

Deploy the overcloud via "openstack overcloud deploy -e <environment_file>".
After deployment completes, ssh in to an overcloud node and "hostname"
Note that the hostname specifies a domain name of ".localdomain".

Steps to Reproduce:
1. See above.

Actual results:
The hostname is set to <name>.localdomain

Expected results:
The hostname should include the domain name specified in the CloudDomain parameter.

Additional info:
Executing "hostname --fqdn" on an overcloud node results in an error:

[heat-admin@r13-controller-0 ~]$ hostname
r13-controller-0.localdomain
[heat-admin@r13-controller-0 ~]$ hostname --fqdn
hostname: Name or service not known

Note that the entries in /etc/hosts are correct and do include the custom domain name.

Comment 2 Steve Reichard 2016-05-19 13:07:32 UTC
I can also reproduce this. 

In two separate configurations I added the CloudDomain and deployed withe release OSP8 bits.  I see the entries in /etc/host have the specified domain, but hostname returns with .localdomain and this is also seen in /etc/hostname.


I know Steve hardy said he saw the hostname return the right value for him, but wonder if that only working in a simple deployment.  My understand is both Chris and I are using network isolation.

Comment 3 Chris Dearborn 2016-05-19 20:23:51 UTC
Update:

If you set dhcp_domain in nova.conf on the undercloud node to the custom domain name in addition to setting the CloudDomain parameter in an environment file, then the hostname is set correctly, /etc/hostname is set up correctly, and hostname --fqdn works as it should.

Comment 4 Chris Dearborn 2016-05-19 20:40:26 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1336952

Comment 5 Steven Hardy 2016-06-09 13:52:46 UTC
(In reply to Chris Dearborn from comment #4)
> See https://bugzilla.redhat.com/show_bug.cgi?id=1336952

Have we ended up with a duplicate, should this bz be closed then we can track fixing the issue via https://bugzilla.redhat.com/show_bug.cgi?id=1336952 (that one contains my debug analysis and links to the upstream bug).

Comment 6 Chris Dearborn 2016-06-09 13:58:51 UTC
Well, they look like 2 separate bugs to me, which is why I wrote 2 BZs.  Don't really care if we glom these into one BZ as long as both bugs are fixed.

Comment 9 arkady kanevsky 2016-11-30 03:48:04 UTC
Chris,
do we need an analog BZ for Mitaka/OSP9 and Newton/OSP10?

Comment 10 Chris Dearborn 2016-11-30 14:34:20 UTC
We have a workaround for this implemented in our solution.  When the fix comes in we can remove the workaround.  I think we only care about the fix in OSP10 and beyond, so there's no need for multiple bugs.  Perhaps this should be retargeted to OSP10.

Comment 11 Sean Merrow 2017-05-30 15:19:31 UTC
Upstream patch is merged in stable/Ocata. Need this backported to OSP 10.

https://review.openstack.org/#/c/452809/

Comment 15 Emilien Macchi 2017-11-02 22:05:03 UTC
Backport here: https://review.openstack.org/#/c/517446/