Bug 1336955 - Specifying custom domain name for overcloud nodes does not work
Summary: Specifying custom domain name for overcloud nodes does not work
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 12.0 (Pike)
Assignee: Emilien Macchi
QA Contact: Gurenko Alex
Depends On:
Blocks: 1295530 1305654 1532376 1532827
TreeView+ depends on / blocked
Reported: 2016-05-17 21:37 UTC by Chris Dearborn
Modified: 2020-04-15 14:29 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1532376 1532827 (view as bug list)
Last Closed: 2019-01-09 18:15:58 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
OpenStack gerrit 433820 0 None MERGED FQDN validation 2021-02-01 01:02:18 UTC

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):

How reproducible:
Create a .yaml environment file containing:
  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
[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

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
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.


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

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