fix(nova): add default live_migration_inbound_addr
At the moment, if live_migration_inbound_addr is not defined it will default to the hostname of the hypervisor which requires DNS in order to work properly. DNS can be complicated and it is possible that an environment might not have it, so it makes sense to default to grabbing the default route interface to do live migrations over in order to allow live migrations when DNS is not setup. Change-Id: I10eb63fc64d7cd34ef89df529637b1e81951e38c
This commit is contained in:
parent
c4e0007717
commit
8f0a154138
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Nova
|
||||
name: nova
|
||||
version: 0.3.6
|
||||
version: 0.3.7
|
||||
home: https://docs.openstack.org/nova/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
|
||||
sources:
|
||||
|
@ -23,18 +23,23 @@ mkdir -p /var/lib/nova/instances
|
||||
chown ${NOVA_USER_UID} /var/lib/nova /var/lib/nova/instances
|
||||
|
||||
migration_interface="{{- .Values.conf.libvirt.live_migration_interface -}}"
|
||||
if [[ -n $migration_interface ]]; then
|
||||
# determine ip dynamically based on interface provided
|
||||
migration_address=$(ip a s $migration_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}' | head -1)
|
||||
if [[ -z $migration_interface ]]; then
|
||||
# search for interface with default routing
|
||||
# If there is not default gateway, exit
|
||||
migration_interface=$(ip -4 route list 0/0 | awk -F 'dev' '{ print $2; exit }' | awk '{ print $1 }') || exit 1
|
||||
fi
|
||||
|
||||
touch /tmp/pod-shared/nova-libvirt.conf
|
||||
if [[ -n $migration_address ]]; then
|
||||
cat <<EOF>/tmp/pod-shared/nova-libvirt.conf
|
||||
migration_address=$(ip a s $migration_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}' | head -1)
|
||||
|
||||
if [ -z "${migration_address}" ] ; then
|
||||
echo "Var live_migration_interface is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tee > /tmp/pod-shared/nova-libvirt.conf << EOF
|
||||
[libvirt]
|
||||
live_migration_inbound_addr = $migration_address
|
||||
EOF
|
||||
fi
|
||||
|
||||
hypervisor_interface="{{- .Values.conf.hypervisor.host_interface -}}"
|
||||
if [[ -z $hypervisor_interface ]]; then
|
||||
|
@ -75,4 +75,5 @@ nova:
|
||||
- 0.3.4 Add OVN values_override, disable dependency to ovn-agent and vif configs for ovn
|
||||
- 0.3.5 Replace node-role.kubernetes.io/master with control-plane
|
||||
- 0.3.6 Fix VNC access issues
|
||||
- 0.3.7 Fix live migration without DNS resolution
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user