Merge "Add support for other_config:vhost-postcopy-support"

This commit is contained in:
Zuul 2022-08-01 16:07:14 +00:00 committed by Gerrit Code Review
commit 0dabc235ad
3 changed files with 33 additions and 1 deletions

View File

@ -58,6 +58,11 @@
# (Optional) Enable TSO support.
# Defaults to false.
#
# [*vhost_postcopy_support*]
# (Optional) Allow switching live migration of VM attached to
# dpdkvhostuserclient port to post-copy mode.
# Defaults to false
#
# [*pmd_auto_lb*]
# (Optional) Configures PMD Auto Load Balancing
# Defaults to false.
@ -98,6 +103,7 @@ class vswitch::dpdk (
$revalidator_cores = undef,
$handler_cores = undef,
$enable_tso = false,
$vhost_postcopy_support = false,
$pmd_auto_lb = false,
$pmd_auto_lb_rebal_interval = undef,
$pmd_auto_lb_load_threshold = undef,
@ -181,7 +187,7 @@ class vswitch::dpdk (
if $enable_tso {
vs_config { 'other_config:userspace-tso-enable':
value => $enable_tso,
value => true,
wait => false,
}
} else {
@ -191,6 +197,20 @@ class vswitch::dpdk (
}
}
if $vhost_postcopy_support {
vs_config { 'other_config:vhost-postcopy-support':
value => true,
restart => true,
wait => false
}
} else {
vs_config { 'other_config:vhost-postcopy-support':
ensure => absent,
restart => true,
wait => false
}
}
if $pmd_auto_lb {
vs_config { 'other_config:pmd-auto-lb':
value => true,

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``ovs::dpdk`` class now supports the ``vhost_postcopy_support``
parameter, which enables/disables postcopy support.

View File

@ -62,6 +62,9 @@ describe 'vswitch::dpdk' do
is_expected.to contain_vs_config('other_config:userspace-tso-enable').with(
:ensure => 'absent', :wait => false,
)
is_expected.to contain_vs_config('other_config:vhost-postcopy-support').with(
:ensure => 'absent', :restart => true, :wait => false,
)
is_expected.to contain_vs_config('other_config:pmd-auto-lb').with(
:ensure => 'absent', :wait => false,
)
@ -96,6 +99,7 @@ describe 'vswitch::dpdk' do
:disable_emc => true,
:vlan_limit => 2,
:enable_tso => true,
:vhost_postcopy_support => true,
:pmd_auto_lb => true,
:pmd_auto_lb_rebal_interval => 1,
:pmd_auto_lb_load_threshold => 95,
@ -133,6 +137,9 @@ describe 'vswitch::dpdk' do
is_expected.to contain_vs_config('other_config:userspace-tso-enable').with(
:value => true, :wait => false,
)
is_expected.to contain_vs_config('other_config:vhost-postcopy-support').with(
:value => true, :restart => true, :wait => false,
)
is_expected.to contain_vs_config('other_config:pmd-auto-lb').with(
:value => true, :wait => false,
)