From 675a59e8cec2527b9e1e78654a616b2672328021 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Thu, 1 Jun 2017 20:38:09 +0000 Subject: [PATCH] Allow setting the DNS domain name in undercloud.conf Without being able to do this, users who want to set CloudDomain during their deployment will have to manually override neutron's dns_domain config, which either requires custom hieradata or the reapplication of the customization after each undercloud update. This is not a good user experience, so we should allow them to set it once in the config file and never have to touch it again. It turns out that the Nova dhcp_domain option must also be set, even though it is a deprecated option. A bug with nova has been opened to address this in the future. Change-Id: I61e5fc005aa27ba76f91a2b84fec751af93061b5 Related-Bug: 1698010 --- .../puppet-stack-config/puppet-stack-config.yaml.template | 4 ++-- instack_undercloud/undercloud.py | 6 ++++++ releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml | 6 ++++++ undercloud.conf.sample | 5 +++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml diff --git a/elements/puppet-stack-config/puppet-stack-config.yaml.template b/elements/puppet-stack-config/puppet-stack-config.yaml.template index 91c90ecc1..4d0324d7f 100644 --- a/elements/puppet-stack-config/puppet-stack-config.yaml.template +++ b/elements/puppet-stack-config/puppet-stack-config.yaml.template @@ -241,7 +241,7 @@ neutron::debug: "%{hiera('debug')}" neutron::bind_host: {{LOCAL_IP}} neutron::core_plugin: ml2 neutron::dhcp_agents_per_network: 2 -neutron::dns_domain: '' +neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}} neutron::server::api_workers: "%{::os_workers}" neutron::server::rpc_workers: "%{::os_workers}" neutron::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}} @@ -408,7 +408,7 @@ nova::api_database_connection: mysql+pymysql://nova_api:{{UNDERCLOUD_NOVA_PASSWO nova::placement_database_connection: mysql+pymysql://nova_placement:{{UNDERCLOUD_NOVA_PASSWORD}}@{{LOCAL_IP}}/nova_placement nova::notify_on_state_change: 'vm_and_task_state' nova::scheduler::enabled: true -nova::network::neutron::dhcp_domain: '' +nova::network::neutron::dhcp_domain: {{OVERCLOUD_DOMAIN_NAME}} nova::compute::force_config_drive: true nova::compute::reserved_host_memory: '0' nova::compute::vnc_enabled: false diff --git a/instack_undercloud/undercloud.py b/instack_undercloud/undercloud.py index ffc16b6fe..4a99f1b0e 100644 --- a/instack_undercloud/undercloud.py +++ b/instack_undercloud/undercloud.py @@ -151,6 +151,12 @@ _opts = [ cfg.ListOpt('undercloud_ntp_servers', default=[], help=('List of ntp servers to use.')), + cfg.StrOpt('overcloud_domain_name', + default='localdomain', + help=('DNS domain name to use when deploying the overcloud. ' + 'The overcloud parameter "CloudDomain" must be set to a ' + 'matching value.') + ), cfg.StrOpt('undercloud_service_certificate', default='', help=('Certificate file to use for OpenStack service SSL ' diff --git a/releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml b/releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml new file mode 100644 index 000000000..ae69104da --- /dev/null +++ b/releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The DNS domain for overcloud nodes can now be set in undercloud.conf + via the overcloud_domain_name option. The same value used for this option + must be passed to the overcloud deploy in the CloudDomain parameter. diff --git a/undercloud.conf.sample b/undercloud.conf.sample index 036ab2a13..824084b3c 100644 --- a/undercloud.conf.sample +++ b/undercloud.conf.sample @@ -39,6 +39,11 @@ # List of ntp servers to use. (list value) #undercloud_ntp_servers = +# DNS domain name to use when deploying the overcloud. The overcloud +# parameter "CloudDomain" must be set to a matching value. (string +# value) +#overcloud_domain_name = localdomain + # Certificate file to use for OpenStack service SSL connections. # Setting this enables SSL for the OpenStack API endpoints, leaving it # unset disables SSL. (string value)