diff --git a/manifests/migration/libvirt.pp b/manifests/migration/libvirt.pp index ca3501dfa..420a2a428 100644 --- a/manifests/migration/libvirt.pp +++ b/manifests/migration/libvirt.pp @@ -44,6 +44,22 @@ # in place, and are validated. # Defaults to $::os_service_default # +# [*live_migration_downtime*] +# (optional) Target maximum period of time Nova will try to keep the instance paused +# during the last part of the memory copy, in miliseconds. +# Defaults to $::os_service_default +# +# [*live_migration_downtime_steps*] +# (optional) Number of incremental steps to reach max downtime value. +# Minimum number of steps is 3. +# Defaults to $::os_service_default +# +# [*live_migration_downtime_delay*] +# (optional) Time to wait, in seconds, between each step increase of the migration +# downtime. Value is per GiB of guest RAM + disk to be transferred, with lower bound +# of a minimum of 2 GiB per device. Minimum delay is 3 seconds. +# Defaults to $::os_service_default +# # [*live_migration_completion_timeout*] # (optional) Time to wait, in seconds, for migration to successfully complete # transferring data before aborting the operation. Value is per GiB of guest @@ -135,6 +151,9 @@ class nova::migration::libvirt( $live_migration_inbound_addr = $::os_service_default, $live_migration_tunnelled = $::os_service_default, $live_migration_with_native_tls = $::os_service_default, + $live_migration_downtime = $::os_service_default, + $live_migration_downtime_steps = $::os_service_default, + $live_migration_downtime_delay = $::os_service_default, $live_migration_completion_timeout = $::os_service_default, $live_migration_timeout_action = $::os_service_default, $live_migration_permit_post_copy = $::os_service_default, @@ -211,6 +230,9 @@ class nova::migration::libvirt( 'libvirt/live_migration_uri': value => $live_migration_uri; 'libvirt/live_migration_tunnelled': value => $live_migration_tunnelled; 'libvirt/live_migration_with_native_tls': value => $live_migration_with_native_tls; + 'libvirt/live_migration_downtime': value => $live_migration_downtime; + 'libvirt/live_migration_downtime_steps': value => $live_migration_downtime_steps; + 'libvirt/live_migration_downtime_delay': value => $live_migration_downtime_delay; 'libvirt/live_migration_completion_timeout': value => $live_migration_completion_timeout; 'libvirt/live_migration_timeout_action': value => $live_migration_timeout_action; 'libvirt/live_migration_inbound_addr': value => $live_migration_inbound_addr; diff --git a/releasenotes/notes/libvirt-migration-downtime-1e9c2df595bb5cd3.yaml b/releasenotes/notes/libvirt-migration-downtime-1e9c2df595bb5cd3.yaml new file mode 100644 index 000000000..af4889a14 --- /dev/null +++ b/releasenotes/notes/libvirt-migration-downtime-1e9c2df595bb5cd3.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Added ``live_migration_downtime``, ``live_migration_downtime_steps``, + and ``live_migration_downtime_delay`` parameters to the ``nova::migration::libvirt`` + class. diff --git a/spec/classes/nova_migration_libvirt_spec.rb b/spec/classes/nova_migration_libvirt_spec.rb index f2cf0b842..a3271c6a5 100644 --- a/spec/classes/nova_migration_libvirt_spec.rb +++ b/spec/classes/nova_migration_libvirt_spec.rb @@ -41,6 +41,9 @@ describe 'nova::migration::libvirt' do it { is_expected.to contain_libvirtd_config('crl_file').with_value('').with_quote(true) } it { is_expected.to contain_nova_config('libvirt/live_migration_tunnelled').with_value('') } it { is_expected.to contain_nova_config('libvirt/live_migration_with_native_tls').with_value('') } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime').with_value('') } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime_steps').with_value('') } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime_delay').with_value('') } it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('') } it { is_expected.to contain_nova_config('libvirt/live_migration_timeout_action').with_value('') } it { is_expected.to contain_nova_config('libvirt/live_migration_uri').with_value('qemu+tcp://%s/system') } @@ -165,11 +168,17 @@ describe 'nova::migration::libvirt' do let :params do { :live_migration_tunnelled => true, + :live_migration_downtime => 800, + :live_migration_downtime_steps => 15, + :live_migration_downtime_delay => 5, :live_migration_completion_timeout => '1500', :live_migration_timeout_action => 'force_complete', } end it { is_expected.to contain_nova_config('libvirt/live_migration_tunnelled').with(:value => true) } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime').with_value(800) } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime_steps').with_value(15) } + it { is_expected.to contain_nova_config('libvirt/live_migration_downtime_delay').with_value(5) } it { is_expected.to contain_nova_config('libvirt/live_migration_completion_timeout').with_value('1500') } it { is_expected.to contain_nova_config('libvirt/live_migration_timeout_action').with_value('force_complete') } end