From 835d4b167ab7db41962239eaabb56f492fa34cde Mon Sep 17 00:00:00 2001 From: Rodrigo Barbieri Date: Thu, 5 Nov 2020 18:32:10 -0300 Subject: [PATCH] Add/update region config in nova.conf On multi-region deployments, Nova may talk to the wrong neutron endpoint (from the wrong region) if the region is unspecified. On Rocky+ it will also require updating the os_region_name config to region_name, as os_region_name has been deprecated, otherwise Nova will talk to the wrong placement endpoint as well. This fix addresses the issue where nova-compute will not register the node to the correct nova_api/placement database, and will also not be able to complete live-migrations. Given that the template for the [placement] section is applied to every release, it is included both old and new config options. Change-Id: I9500ba400d55e6f1bc11f2ba05b25b4714cda578 Closes-bug: #1903210 --- templates/parts/section-placement | 1 + templates/rocky/nova.conf | 3 +++ templates/stein/nova.conf | 3 +++ templates/train/nova.conf | 3 +++ 4 files changed, 10 insertions(+) diff --git a/templates/parts/section-placement b/templates/parts/section-placement index 344c49e9..797feadc 100644 --- a/templates/parts/section-placement +++ b/templates/parts/section-placement @@ -15,6 +15,7 @@ password = {{ admin_password }} {% endif -%} {% if region -%} os_region_name = {{ region }} +region_name = {{ region }} {% endif -%} {% if use_internal_endpoints -%} os_interface = internal diff --git a/templates/rocky/nova.conf b/templates/rocky/nova.conf index 5350715a..0831af93 100644 --- a/templates/rocky/nova.conf +++ b/templates/rocky/nova.conf @@ -154,6 +154,9 @@ alias = {{ pci_alias }} {% if network_manager == 'neutron' and network_manager_config -%} [neutron] url = {{ network_manager_config.neutron_url }} +{% if region -%} +region_name = {{ region }} +{% endif -%} {% if network_manager_config.keystone_host or auth_host -%} {% if neutron_plugin and neutron_plugin == 'vsp' -%} ovs_bridge = alubr0 diff --git a/templates/stein/nova.conf b/templates/stein/nova.conf index 4b5898b3..69737f33 100644 --- a/templates/stein/nova.conf +++ b/templates/stein/nova.conf @@ -158,6 +158,9 @@ alias = {{ pci_alias }} {% if network_manager == 'neutron' and network_manager_config -%} [neutron] url = {{ network_manager_config.neutron_url }} +{% if region -%} +region_name = {{ region }} +{% endif -%} {% if network_manager_config.keystone_host or auth_host -%} {% if neutron_plugin and neutron_plugin == 'vsp' -%} ovs_bridge = alubr0 diff --git a/templates/train/nova.conf b/templates/train/nova.conf index 4c1be641..8e5852f7 100644 --- a/templates/train/nova.conf +++ b/templates/train/nova.conf @@ -165,6 +165,9 @@ alias = {{ pci_alias }} {% if network_manager == 'neutron' and network_manager_config -%} [neutron] url = {{ network_manager_config.neutron_url }} +{% if region -%} +region_name = {{ region }} +{% endif -%} {% if network_manager_config.keystone_host or auth_host -%} {% if neutron_plugin and neutron_plugin == 'vsp' -%} ovs_bridge = alubr0