Browse Source

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
Ben Nemec 1 year ago
parent
commit
675a59e8ce

+ 2
- 2
elements/puppet-stack-config/puppet-stack-config.yaml.template View File

@@ -241,7 +241,7 @@ neutron::debug: "%{hiera('debug')}"
241 241
 neutron::bind_host: {{LOCAL_IP}}
242 242
 neutron::core_plugin: ml2
243 243
 neutron::dhcp_agents_per_network: 2
244
-neutron::dns_domain: ''
244
+neutron::dns_domain: {{OVERCLOUD_DOMAIN_NAME}}
245 245
 neutron::server::api_workers: "%{::os_workers}"
246 246
 neutron::server::rpc_workers: "%{::os_workers}"
247 247
 neutron::rabbit_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
@@ -408,7 +408,7 @@ nova::api_database_connection: mysql+pymysql://nova_api:{{UNDERCLOUD_NOVA_PASSWO
408 408
 nova::placement_database_connection: mysql+pymysql://nova_placement:{{UNDERCLOUD_NOVA_PASSWORD}}@{{LOCAL_IP}}/nova_placement
409 409
 nova::notify_on_state_change: 'vm_and_task_state'
410 410
 nova::scheduler::enabled: true
411
-nova::network::neutron::dhcp_domain: ''
411
+nova::network::neutron::dhcp_domain: {{OVERCLOUD_DOMAIN_NAME}}
412 412
 nova::compute::force_config_drive: true
413 413
 nova::compute::reserved_host_memory: '0'
414 414
 nova::compute::vnc_enabled: false

+ 6
- 0
instack_undercloud/undercloud.py View File

@@ -151,6 +151,12 @@ _opts = [
151 151
     cfg.ListOpt('undercloud_ntp_servers',
152 152
                 default=[],
153 153
                 help=('List of ntp servers to use.')),
154
+    cfg.StrOpt('overcloud_domain_name',
155
+               default='localdomain',
156
+               help=('DNS domain name to use when deploying the overcloud. '
157
+                     'The overcloud parameter "CloudDomain" must be set to a '
158
+                     'matching value.')
159
+               ),
154 160
     cfg.StrOpt('undercloud_service_certificate',
155 161
                default='',
156 162
                help=('Certificate file to use for OpenStack service SSL '

+ 6
- 0
releasenotes/notes/set-dns-domain-08abe0d0fe7d2e65.yaml View File

@@ -0,0 +1,6 @@
1
+---
2
+features:
3
+  - |
4
+    The DNS domain for overcloud nodes can now be set in undercloud.conf
5
+    via the overcloud_domain_name option.  The same value used for this option
6
+    must be passed to the overcloud deploy in the CloudDomain parameter.

+ 5
- 0
undercloud.conf.sample View File

@@ -39,6 +39,11 @@
39 39
 # List of ntp servers to use. (list value)
40 40
 #undercloud_ntp_servers =
41 41
 
42
+# DNS domain name to use when deploying the overcloud. The overcloud
43
+# parameter "CloudDomain" must be set to a matching value. (string
44
+# value)
45
+#overcloud_domain_name = localdomain
46
+
42 47
 # Certificate file to use for OpenStack service SSL connections.
43 48
 # Setting this enables SSL for the OpenStack API endpoints, leaving it
44 49
 # unset disables SSL. (string value)

Loading…
Cancel
Save