From 282ef4e391273a62582b42908bced1539d984a33 Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Mon, 3 Jun 2019 11:20:29 +0200 Subject: [PATCH] Add parameter for `compute/live_migration_wait_for_vif_plug` Add parameter `live_migration_wait_for_vif_plug` to whether to wait for ``network-vif-plugged`` events before starting guest transfer. Also fixes some allignment in compute.pp Change-Id: I0048d1f57eeb3418b52f225f87810ea1a7250a0f --- manifests/compute.pp | 46 +++++++++++-------- ...on_wait_for_vif_plug-b50f7840c4da6659.yaml | 6 +++ spec/classes/nova_compute_spec.rb | 4 ++ 3 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/live_migration_wait_for_vif_plug-b50f7840c4da6659.yaml diff --git a/manifests/compute.pp b/manifests/compute.pp index 450b4dda4..420c0d7f7 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -75,26 +75,26 @@ # Time period must be hour, day, month or year # Defaults to 'month' # -# [*force_raw_images*] +# [*force_raw_images*] # (optional) Force backing images to raw format. # Defaults to true # -# [*reserved_host_memory*] +# [*reserved_host_memory*] # Reserved host memory # The amount of memory in MB reserved for the host. # Defaults to '512' # -# [*config_drive_format*] +# [*config_drive_format*] # (optional) Config drive format. One of iso9660 (default) or vfat # Defaults to undef # -# [*allow_resize_to_same_host*] +# [*allow_resize_to_same_host*] # (optional) Allow destination machine to match source for resize. # Useful when testing in single-host environments. Note that this # can also be set in the api.pp class. # Defaults to false # -# [*resize_confirm_window*] +# [*resize_confirm_window*] # (optional) Automatically confirm resizes after N seconds. # Resize functionality will save the existing server before resizing. # After the resize completes, user is requested to confirm the resize. @@ -105,18 +105,18 @@ # server is in resized state longer than that time. # Defaults to $::os_service_default # -# [*vcpu_pin_set*] +# [*vcpu_pin_set*] # (optional) A list or range of physical CPU cores to reserve # for virtual machine processes # Defaults to $::os_service_default # -# [*cpu_shared_set*] +# [*cpu_shared_set*] # (optional) A list or range of physical CPU cores to reserve # for best-effort guest vCPU resources (e.g. emulator threads in # libvirt/QEMU) # Defaults to $::os_service_default # -# [*resume_guests_state_on_host_boot*] +# [*resume_guests_state_on_host_boot*] # (optional) This option specifies whether to start guests that were running before the # host rebooted. It ensures that all of the instances on a Nova compute node # resume their state each time the compute node boots or restarts. @@ -162,20 +162,24 @@ # (optional) Whether to verify image signatures. (boolean value) # Defaults to $::os_service_default # -# [*reserved_huge_pages*] -# (optional) Number of huge memory pages to reserved per NUMA host cell. -# Defaults to $::os_service_default -# Accepts a string e.g "node:0,size:1GB,count:4" or a list of strings e.g: -# ["node:0,size:1GB,count:4", "node:1,size:1GB,count:4"] +# [*reserved_huge_pages*] +# (optional) Number of huge memory pages to reserved per NUMA host cell. +# Defaults to $::os_service_default +# Accepts a string e.g "node:0,size:1GB,count:4" or a list of strings e.g: +# ["node:0,size:1GB,count:4", "node:1,size:1GB,count:4"] # -# [*neutron_physnets_numa_nodes_mapping*] -# (optional) Map of physnet name as key and list of NUMA nodes as value. -# Defaults to {} +# [*neutron_physnets_numa_nodes_mapping*] +# (optional) Map of physnet name as key and list of NUMA nodes as value. +# Defaults to {} # -# [*neutron_tunnel_numa_nodes*] -# (optional) List of NUMA nodes to configure NUMA affinity for all -# tunneled networks. -# Defaults to [] +# [*neutron_tunnel_numa_nodes*] +# (optional) List of NUMA nodes to configure NUMA affinity for all +# tunneled networks. +# Defaults to [] +# +# [*live_migration_wait_for_vif_plug*] +# (optional) whether to wait for ``network-vif-plugged`` events before starting guest transfer +# Defaults to $::os_service_default # # DEPRECATED PARAMETERS # @@ -221,6 +225,7 @@ class nova::compute ( $reserved_huge_pages = $::os_service_default, $neutron_physnets_numa_nodes_mapping = {}, $neutron_tunnel_numa_nodes = [], + $live_migration_wait_for_vif_plug = $::os_service_default, # DEPRECATED PARAMETERS $vnc_keymap = undef, ) { @@ -308,6 +313,7 @@ class nova::compute ( 'DEFAULT/sync_power_state_interval': value => $sync_power_state_interval; 'compute/consecutive_build_service_disable_threshold': value => $consecutive_build_service_disable_threshold; + 'compute/live_migration_wait_for_vif_plug': value => $live_migration_wait_for_vif_plug; } ensure_resource('nova_config', 'DEFAULT/allow_resize_to_same_host', { value => $allow_resize_to_same_host }) diff --git a/releasenotes/notes/live_migration_wait_for_vif_plug-b50f7840c4da6659.yaml b/releasenotes/notes/live_migration_wait_for_vif_plug-b50f7840c4da6659.yaml new file mode 100644 index 000000000..e131d33b3 --- /dev/null +++ b/releasenotes/notes/live_migration_wait_for_vif_plug-b50f7840c4da6659.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add parameter `live_migration_wait_for_vif_plug` to + whether to wait for ``network-vif-plugged`` events before + starting guest transfer. diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 4445fe33b..4b1ecdf65 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -40,6 +40,7 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/sync_power_state_interval').with_value('') } it { is_expected.to contain_nova_config('compute/consecutive_build_service_disable_threshold').with_value('') } it { is_expected.to contain_nova_config('DEFAULT/reserved_huge_pages').with_value('') } + it { is_expected.to contain_nova_config('compute/live_migration_wait_for_vif_plug').with_value('') } it { is_expected.to_not contain_package('cryptsetup').with( :ensure => 'present' )} @@ -106,6 +107,7 @@ describe 'nova::compute' do :sync_power_state_interval => '0', :verify_glance_signatures => true, :consecutive_build_service_disable_threshold => '9', + :live_migration_wait_for_vif_plug => true, } end @@ -169,6 +171,8 @@ describe 'nova::compute' do it { is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with_value(true) } it { is_expected.to contain_nova_config('glance/verify_glance_signatures').with_value(true) } + it { is_expected.to contain_nova_config('compute/live_migration_wait_for_vif_plug').with_value(true) } + it 'configures nova config_drive_format to vfat' do is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat') is_expected.to_not contain_package('genisoimage').with(