7189e6c916
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] commit31be86079d
[2] commit8f0a154138
Change-Id: Iaf86e0a215802001f58d607a1a3a18acf83f5e81 Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com> Signed-off-by: Robert Church <robert.church@windriver.com>
33 lines
1.1 KiB
Smarty
33 lines
1.1 KiB
Smarty
#!/bin/bash
|
|
|
|
{{/*
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
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 }}
|