From ffd2823327f2db7a6656498ab935c889af887af6 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 6 Apr 2021 15:20:17 +0300 Subject: [PATCH] Re-add nova_dhcp_domain variable It still makes sense to carry a variable for defining dns_domain since deployers will be able to control them with single variable for all services. Closes-Bug: #1922703 Change-Id: I2be47100ce701e71dda2fe4e8ca58a7b6cad529c --- defaults/main.yml | 4 ++++ releasenotes/notes/nova_dhcp_domain-6e1d4192fb6c7909.yaml | 7 +++++++ templates/nova.conf.j2 | 1 + 3 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/nova_dhcp_domain-6e1d4192fb6c7909.yaml diff --git a/defaults/main.yml b/defaults/main.yml index a2cc5193..4c77b280 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -187,6 +187,10 @@ nova_keystone_auth_plugin: password ## Nova enabled apis nova_enabled_apis: "osapi_compute,metadata" +## Domain name used to configure FQDN for instances. When empty, only the hostname without +## a domain will be configured. +nova_dhcp_domain: "{{ dhcp_domain | default('') }}" + ## Nova v2.1 nova_service_name: nova nova_service_type: compute diff --git a/releasenotes/notes/nova_dhcp_domain-6e1d4192fb6c7909.yaml b/releasenotes/notes/nova_dhcp_domain-6e1d4192fb6c7909.yaml new file mode 100644 index 00000000..9f1cc901 --- /dev/null +++ b/releasenotes/notes/nova_dhcp_domain-6e1d4192fb6c7909.yaml @@ -0,0 +1,7 @@ +--- + +features: + - | + Re-added ``nova_dhcp_domain`` variable that defaults to the + ``dhcp_domain``. When set to empty string, only the hostname without + a domain will be configured for the instances. diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index f3813e20..7b385103 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -273,6 +273,7 @@ secure_proxy_ssl_header = {{ nova_secure_proxy_ssl_header }} [api] use_forwarded_for = {{ nova_network_services[nova_network_type]['use_forwarded_for'] | bool }} vendordata_jsonfile_path = /etc/nova/vendor_data.json +dhcp_domain = {{ nova_dhcp_domain }} [scheduler] workers = {{ nova_scheduler_workers | default(nova_api_threads) }}