Allow to disable TSO on L3 agent nodes
When running Linux kernel 3.14, TSO/GRO could be enabled on compute nodes to improve performances. To improve north-south performances, this feature is needed on Neutron L3 agent nodes. This patch add TSO management for Neutron L3 agent and also change the behavor for previous patch in ensuring that we use a kernel >= 3.14 for both hypervisor & compute nodes. Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
20eee6d222
commit
4ea00c1458
@ -29,11 +29,6 @@
|
||||
# cinder volumes backend by ceph on nova instances.
|
||||
# Default to false.
|
||||
#
|
||||
# [*manage_tso]
|
||||
# (optional) Enable or not TSO/GSO/GRO/UFO on neutron interfaces.
|
||||
# Should be at True when running linux kernel 3.14.
|
||||
# Default to true.
|
||||
#
|
||||
|
||||
class cloud::compute::hypervisor(
|
||||
$server_proxyclient_address = '127.0.0.1',
|
||||
@ -48,7 +43,6 @@ class cloud::compute::hypervisor(
|
||||
$nova_rbd_secret_uuid = undef,
|
||||
$vm_rbd = false,
|
||||
$volume_rbd = false,
|
||||
$manage_tso = true,
|
||||
# set to false to keep backward compatibility
|
||||
$ks_spice_public_proto = false,
|
||||
$ks_spice_public_host = false,
|
||||
@ -130,7 +124,7 @@ Host *
|
||||
|
||||
}
|
||||
|
||||
if $::operatingsystem == 'RedHat' {
|
||||
if $::osfamily == 'RedHat' {
|
||||
file { '/etc/libvirt/qemu.conf':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/cloud/qemu/qemu.conf',
|
||||
@ -145,7 +139,7 @@ Host *
|
||||
}
|
||||
} else {
|
||||
# Disabling or not TSO/GSO/GRO on Debian systems
|
||||
if $manage_tso {
|
||||
if $::kernelmajversion >= '3.14' {
|
||||
ensure_resource ('exec','enable-tso-script', {
|
||||
'command' => '/usr/sbin/update-rc.d disable-tso defaults',
|
||||
'unless' => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
|
@ -46,4 +46,18 @@ class cloud::network::l3(
|
||||
debug => $debug,
|
||||
}
|
||||
|
||||
# Disabling or not TSO/GSO/GRO on Debian systems
|
||||
if $::osfamily == 'Debian' and $::kernelmajversion >= '3.14' {
|
||||
ensure_resource ('exec','enable-tso-script', {
|
||||
'command' => '/usr/sbin/update-rc.d disable-tso defaults',
|
||||
'unless' => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
'onlyif' => 'test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
ensure_resource ('exec','start-tso-script', {
|
||||
'command' => '/etc/init.d/disable-tso start',
|
||||
'unless' => 'test -f /tmp/disable-tso-lock',
|
||||
'onlyif' => 'test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ describe 'cloud::compute::hypervisor' do
|
||||
:ks_spice_public_host => '10.0.0.2',
|
||||
:vm_rbd => false,
|
||||
:volume_rbd => false,
|
||||
:manage_tso => true,
|
||||
:ks_nova_public_host => '10.0.0.1' }
|
||||
end
|
||||
|
||||
@ -272,13 +271,12 @@ describe 'cloud::compute::hypervisor' do
|
||||
end
|
||||
|
||||
context 'without TSO/GSO/GRO on Debian systems' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:concat_basedir => '/var/lib/puppet/concat'
|
||||
}
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:kernelmajversion => '3.14',
|
||||
:concat_basedir => '/var/lib/puppet/concat' )
|
||||
end
|
||||
|
||||
it 'ensure TSO script is enabled at boot' do
|
||||
should contain_exec('enable-tso-script').with(
|
||||
:command => '/usr/sbin/update-rc.d disable-tso defaults',
|
||||
@ -295,10 +293,10 @@ describe 'cloud::compute::hypervisor' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with TSO/GSO/GRO on Debian systems' do
|
||||
context 'ensure TSO/GSO/GRO is not managed on Debian systems with kernel < 3.14' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian' )
|
||||
params.merge!( :manage_tso => false )
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:kernelmajversion => '3.12' )
|
||||
end
|
||||
|
||||
it 'ensure TSO script is not enabled at boot' do
|
||||
@ -410,7 +408,7 @@ describe 'cloud::compute::hypervisor' do
|
||||
|
||||
context 'when trying to enable RBD backend on RedHat plaforms' do
|
||||
before :each do
|
||||
facts.merge!( :operatingsystem => 'RedHat' )
|
||||
facts.merge!( :osfamily => 'RedHat' )
|
||||
params.merge!(
|
||||
:vm_rbd => true,
|
||||
:cinder_rbd_user => 'cinder',
|
||||
@ -422,7 +420,7 @@ describe 'cloud::compute::hypervisor' do
|
||||
|
||||
context 'when trying to enable RBD backend with deprecated parameter on RedHat plaforms' do
|
||||
before :each do
|
||||
facts.merge!( :operatingsystem => 'RedHat' )
|
||||
facts.merge!( :osfamily => 'RedHat' )
|
||||
params.merge!(
|
||||
:has_ceph => true,
|
||||
:cinder_rbd_user => 'cinder',
|
||||
|
@ -151,6 +151,42 @@ describe 'cloud::network::l3' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
|
||||
context 'without TSO/GSO/GRO on Debian systems with 3.14 kernel' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:kernelmajversion => '3.14' )
|
||||
end
|
||||
|
||||
it 'ensure TSO script is enabled at boot' do
|
||||
should contain_exec('enable-tso-script').with(
|
||||
:command => '/usr/sbin/update-rc.d disable-tso defaults',
|
||||
:unless => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
:onlyif => 'test -f /etc/init.d/disable-tso'
|
||||
)
|
||||
end
|
||||
it 'start TSO script' do
|
||||
should contain_exec('start-tso-script').with(
|
||||
:command => '/etc/init.d/disable-tso start',
|
||||
:unless => 'test -f /tmp/disable-tso-lock',
|
||||
:onlyif => 'test -f /etc/init.d/disable-tso'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'ensure TSO/GSO/GRO is not managed on Debian systems with kernel < 3.14' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:kernelmajversion => '3.12' )
|
||||
end
|
||||
|
||||
it 'ensure TSO script is not enabled at boot' do
|
||||
should_not contain_exec('enable-tso-script')
|
||||
end
|
||||
it 'do no tstart TSO script' do
|
||||
should_not contain_exec('start-tso-script')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user