Disable TSO on all systems
Even on RHEL7 + OSP5, there is an issue on TSO/GSO. So we need to ensure that it's disable also on RHEL7/CentOS7 systems. Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -141,23 +141,29 @@ Host *
|
||||
if $has_ceph or $vm_rbd {
|
||||
fail('Red Hat does not support RBD backend for VMs.')
|
||||
}
|
||||
} else {
|
||||
# Disabling or not TSO/GSO/GRO on Debian systems
|
||||
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',
|
||||
'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'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# Disabling TSO/GSO/GRO
|
||||
if $::osfamily == 'Debian' {
|
||||
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' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
} elsif $::osfamily == 'RedHat' {
|
||||
ensure_resource ('exec','enable-tso-script', {
|
||||
'command' => '/usr/sbin/chkconfig disable-tso on',
|
||||
'unless' => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
}
|
||||
ensure_resource ('exec','start-tso-script', {
|
||||
'command' => '/etc/init.d/disable-tso start',
|
||||
'unless' => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
|
||||
|
||||
if $::operatingsystem == 'Ubuntu' {
|
||||
service { 'dbus':
|
||||
ensure => running,
|
||||
|
||||
@@ -46,18 +46,24 @@ class cloud::network::l3(
|
||||
debug => $debug,
|
||||
}
|
||||
|
||||
# Disabling or not TSO/GSO/GRO on Debian systems
|
||||
if $::osfamily == 'Debian' and $::kernelmajversion >= '3.14' {
|
||||
# Disabling TSO/GSO/GRO
|
||||
if $::osfamily == 'Debian' {
|
||||
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'
|
||||
'onlyif' => '/usr/bin/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'
|
||||
} elsif $::osfamily == 'RedHat' {
|
||||
ensure_resource ('exec','enable-tso-script', {
|
||||
'command' => '/usr/sbin/chkconfig disable-tso on',
|
||||
'unless' => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
}
|
||||
ensure_resource ('exec','start-tso-script', {
|
||||
'command' => '/etc/init.d/disable-tso start',
|
||||
'unless' => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -276,37 +276,43 @@ describe 'cloud::compute::hypervisor' do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:vtx => true,
|
||||
: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',
|
||||
:unless => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
:onlyif => 'test -f /etc/init.d/disable-tso'
|
||||
:onlyif => '/usr/bin/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'
|
||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
:onlyif => '/usr/bin/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
|
||||
context 'without TSO/GSO/GRO on Red Hat systems' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
facts.merge!( :osfamily => 'RedHat',
|
||||
:vtx => true,
|
||||
:kernelmajversion => '3.12' )
|
||||
:concat_basedir => '/var/lib/puppet/concat' )
|
||||
end
|
||||
|
||||
it 'ensure TSO script is not enabled at boot' do
|
||||
should_not contain_exec('enable-tso-script')
|
||||
it 'ensure TSO script is enabled at boot' do
|
||||
should contain_exec('enable-tso-script').with(
|
||||
:command => '/usr/sbin/chkconfig disable-tso on',
|
||||
:unless => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
)
|
||||
end
|
||||
it 'do no tstart TSO script' do
|
||||
should_not contain_exec('start-tso-script')
|
||||
it 'start TSO script' do
|
||||
should contain_exec('start-tso-script').with(
|
||||
:command => '/etc/init.d/disable-tso start',
|
||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -152,41 +152,47 @@ describe 'cloud::network::l3' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'without TSO/GSO/GRO on Debian systems with 3.14 kernel' do
|
||||
context 'without TSO/GSO/GRO on Red Hat systems' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian',
|
||||
:kernelmajversion => '3.14' )
|
||||
facts.merge!( :osfamily => 'RedHat')
|
||||
end
|
||||
|
||||
it 'ensure TSO script is enabled at boot' do
|
||||
should contain_exec('enable-tso-script').with(
|
||||
:command => '/usr/sbin/chkconfig disable-tso on',
|
||||
:unless => '/bin/ls /etc/rc*.d | /bin/grep disable-tso',
|
||||
:onlyif => '/usr/bin/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 => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'without TSO/GSO/GRO on Debian systems' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'Debian')
|
||||
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'
|
||||
:onlyif => '/usr/bin/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'
|
||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
||||
:onlyif => '/usr/bin/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
|
||||
|
||||
Reference in New Issue
Block a user