Explicitly set KVM machine_type for migration compatibility

Currently when nova launches a guest instance, libvirt uses
current default KVM/QEMU machine type for guest.
If compute node is running on RHEL-7.3.0, then the guest will
be given rhel-7.3.0 machine type. If in future, deployment has
added additional compute nodes which uses a newer RHEL version,
the guests launched on those compute nodes will get a newer
machine type. eg. rhel-7.4.0

It is now impossible to migrate guests from RHEL-7.4 based compute
nodes to a RHEL-7.3 based compute nodes, since RHEL-7.3 won't
know about RHEL-7.4 machine type.

To deal with this problem, the proposed change will explicitly
set machine type across all compute nodes during deployment.
Now even if additional compute nodes are added to deployment with
newer OS version, instances spawned on those will get the default
machine type explicitly set during initial deployment,
allowing migrating instances from higher machine type compute
nodes to lower machine type compute nodes.

Closes-Bug: 1806529
Change-Id: Ib57bfbb94e2acdfb3bb3a828ee3b085bf68d3b4c
This commit is contained in:
Rajesh Tailor 2018-10-26 12:30:45 +05:30
parent 795dfcfdce
commit f770724740
2 changed files with 16 additions and 0 deletions

View File

@ -202,6 +202,13 @@ parameters:
type: boolean type: boolean
tags: tags:
- role_specific - role_specific
NovaHWMachineType:
description: >
To specify a default machine type per host architecture.
default: 'x86_64=pc-i440fx-rhel7.6.0,aarch64=virt-rhel7.6.0,ppc64=pseries-rhel7.6.0,ppc64le=pseries-rhel7.6.0'
type: string
tags:
- role_specific
conditions: conditions:
enable_live_migration_tunnelled: enable_live_migration_tunnelled:
@ -245,6 +252,7 @@ resources:
nova::compute::libvirt::tx_queue_size: NovaLibvirtTxQueueSize nova::compute::libvirt::tx_queue_size: NovaLibvirtTxQueueSize
nova::compute::libvirt::file_backed_memory: NovaLibvirtFileBackedMemory nova::compute::libvirt::file_backed_memory: NovaLibvirtFileBackedMemory
nova::compute::libvirt::volume_use_multipath: NovaLibvirtVolumeUseMultipath nova::compute::libvirt::volume_use_multipath: NovaLibvirtVolumeUseMultipath
nova::compute::libvirt::libvirt_hw_machine_type: NovaHWMachineType
- values: {get_param: [RoleParameters]} - values: {get_param: [RoleParameters]}
- values: - values:
NovaVcpuPinSet: {get_param: NovaVcpuPinSet} NovaVcpuPinSet: {get_param: NovaVcpuPinSet}
@ -257,6 +265,7 @@ resources:
NovaLibvirtTxQueueSize: {get_param: NovaLibvirtTxQueueSize} NovaLibvirtTxQueueSize: {get_param: NovaLibvirtTxQueueSize}
NovaLibvirtFileBackedMemory: {get_param: NovaLibvirtFileBackedMemory} NovaLibvirtFileBackedMemory: {get_param: NovaLibvirtFileBackedMemory}
NovaLibvirtVolumeUseMultipath: {get_param: NovaLibvirtVolumeUseMultipath} NovaLibvirtVolumeUseMultipath: {get_param: NovaLibvirtVolumeUseMultipath}
NovaHWMachineType: {get_param: NovaHWMachineType}
outputs: outputs:
role_data: role_data:

View File

@ -0,0 +1,7 @@
---
features:
- |
Add parameter `NovaHWMachineType` which allows to explicitly
set machine_type across all compute nodes during deployment,
to allow migration compatibility from compute nodes with higher
host OS version to compute nodes with lower host OS version.