Use Nova management IP for live migrations

Our installation uses separate networks for deployment and for
OpenStack management. By default, live migrations depend upon a
hostname, which resolves to an IP on our (lower speed) deployment
network. Dependent on the deployment, the hostname may not be a
reliable mechanism for determining the correct network for live
migrations.

Nova exposes a live_migration_inbound_addr which can be used to
correct this. This patch defaults the inbound_addr to match the
Nova service bind address, but provides the option for it to be
overwritten through variables.

Whilst the Nova docs suggest that live_migration_inbound_addr
is ignored when live_migration_tunnelled is enabled this appears
to be inaccurate from our testing.

Change-Id: Iff6326f72971364d275ea999418d476007690ef8
Related-Bug: #1576724
This commit is contained in:
Andrew Bonney 2020-07-15 10:48:37 +01:00
parent 3d9b4f876d
commit 71f3fb224a
2 changed files with 2 additions and 0 deletions

View File

@ -257,6 +257,7 @@ nova_libvirt_inject_partition: -2
nova_libvirt_inject_password: False
nova_libvirt_disk_cachemodes: '{{ nova_libvirt_images_rbd_pool is defined | ternary("network=writeback", "") }}'
nova_libvirt_hw_disk_discard: '{{ nova_libvirt_images_rbd_pool is defined | ternary("unmap", "ignore") }}'
nova_libvirt_live_migration_inbound_addr: '{{ (nova_management_address == "localhost") | ternary("127.0.0.1", nova_management_address) }}'
## Nova console
nova_console_agent_enabled: True

View File

@ -235,6 +235,7 @@ images_rbd_ceph_conf = /etc/ceph/ceph.conf
{% endif %}
live_migration_uri = "qemu+ssh://nova@%s/system?no_verify=1&keyfile={{ nova_system_home_folder }}/.ssh/id_rsa"
live_migration_tunnelled = True
live_migration_inbound_addr = {{ nova_libvirt_live_migration_inbound_addr }}
hw_disk_discard = {{ nova_libvirt_hw_disk_discard }}
disk_cachemodes = {{ nova_libvirt_disk_cachemodes }}
{% endif %}