Nova: Add IP addresses search control flag

Add options to nova to enable/disable the use of:
1. The vnc or spice server proxyclient address found by the console
   compute init container
2. The my_ip hypervisor address found by compute init container
3. The libvirt live_migration_inbound_addr used by nova compute to
   live-migrate instances

These options can be used to prevent cases where the found addresses
overwrite what has already been defined in nova.conf by per host nova
compute DaemonSet overrides.
It is important to allow the flexibility of using or not the default
ConfigMap - DaemonSet cluster level configuration, allowing the
possibility of having custom per host overrides definitions that will
not be overwrite by nova-compute-init.sh

One use case (live-migration) for this flexibility is the following:
Originally the nova-compute-init.sh script received the capability of
selection a target interface (by name, in a ConfigMap level) through
which the live-migration traffic should be handled [1], allowing the
possibility of selecting a separate network to handle live-migration
traffic. This was not assuming any interface/network IP if users did not
set .Values.conf.libvirt.live_migration_interface.
Later [2], same script was updated to fall-back to default gateway IP
resolution in case the live_migration_interface is not defined.
So, currently it is mandatory to define a "cluster level config" for the
interface name (i.e., through ConfigMap) or to rely on default gateway
IP resolution for live-migration addresses.
This can be problematic for use cases were:
* There are many networks defined for the cluster and a host default
  gateway might not resolve to the desired network IP;
* There is the need of having a per host definition of nova.conf, since
  nova-compute-init.sh will create a new .conf that will overwrite it.

[1] commit 31be86079d
[2] commit 8f0a154138

Change-Id: Iaf86e0a215802001f58d607a1a3a18acf83f5e81
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Thales Elero Cervi 2023-09-25 15:34:55 -03:00
parent 75c30f43db
commit 7189e6c916
4 changed files with 13 additions and 2 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Nova
name: nova
version: 0.3.24
version: 0.3.25
home: https://docs.openstack.org/nova/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
sources:

View File

@ -18,9 +18,15 @@ set -ex
exec nova-compute \
--config-file /etc/nova/nova.conf \
{{- if .Values.console.address_search_enabled }}
--config-file /tmp/pod-shared/nova-console.conf \
{{- end }}
{{- if .Values.conf.libvirt.address_search_enabled }}
--config-file /tmp/pod-shared/nova-libvirt.conf \
{{- end }}
{{- if and ( empty .Values.conf.nova.DEFAULT.host ) ( .Values.pod.use_fqdn.compute ) }}
--config-file /tmp/pod-shared/nova-compute-fqdn.conf \
{{- end }}
{{- if .Values.conf.hypervisor.address_search_enabled }}
--config-file /tmp/pod-shared/nova-hypervisor.conf
{{- end }}

View File

@ -503,6 +503,7 @@ console:
vncproxy:
# IF blank, search default routing interface
vncserver_proxyclient_interface:
address_search_enabled: true
ceph_client:
configmap: ceph-etc
@ -1338,10 +1339,13 @@ conf:
cpu_allocation_ratio: 1.0
reserved_host_memory_mb: 0
libvirt:
# Get the IP address to be used as the target for live migration traffic using interface name.
address_search_enabled: true
# When "address_search_enabled", get the IP address to be used as the target for live migration
# traffic using interface name.
# If this option is set to None, the hostname of the migration target compute node will be used.
live_migration_interface:
hypervisor:
address_search_enabled: true
# my_ip can be set automatically through this interface name.
host_interface:
# This list is the keys to exclude from the config file ingested by nova-compute

View File

@ -93,4 +93,5 @@ nova:
- 0.3.22 Replace deprecated configuration vncserver_proxyclient_address to server_proxyclient_address
- 0.3.23 Add Ubuntu Jammy overrides
- 0.3.24 Create a certificate for novnc vencrypt separately
- 0.3.25 Add IP addresses search control flag
...