42ad43bd70
mlnx-ofed-kernel module on Ubuntu After recompilation the drivers are reloaded, there is a dependency between OVS and openibd - OVS must be reloaded whenever openibd is reloaded. Change-Id: Ia96f4e8c4c9ae88b501202c343dc589848ef7cfd Closes-bug: 1397891 Signed-off-by: gilmeir <gilmeir@mellanox.com>
39 lines
1.3 KiB
Puppet
39 lines
1.3 KiB
Puppet
class mellanox_openstack::ofed_recompile {
|
|
|
|
$ofed_recompile_script_dir = '/opt/ofed'
|
|
$ofed_recompile_script_name = 'ofed_recompile.sh'
|
|
$ofed_recompile_script = "${ofed_recompile_script_dir}/${ofed_recompile_script_name}"
|
|
|
|
if ($::osfamily == 'Debian') {
|
|
file { $ofed_recompile_script_dir :
|
|
ensure => directory,
|
|
}
|
|
file { $ofed_recompile_script :
|
|
ensure => present,
|
|
mode => '0644',
|
|
require => File[$ofed_recompile_script_dir],
|
|
source => "puppet:///modules/mellanox_openstack/${ofed_recompile_script_name}",
|
|
}
|
|
package { 'dkms' :
|
|
ensure => latest
|
|
}
|
|
exec { 'ofed_recompile' :
|
|
command => "bash ${ofed_recompile_script} recompile",
|
|
unless => "bash ${ofed_recompile_script} status",
|
|
path => ['/usr/bin','/usr/sbin','/bin','/sbin','/usr/local/bin'],
|
|
require => [ File[$ofed_recompile_script], Package['dkms'] ],
|
|
logoutput => true,
|
|
notify => Service['openibd'],
|
|
}
|
|
service { 'openibd' :
|
|
ensure => "running",
|
|
notify => Exec['restart_ovs_for_openibd'],
|
|
}
|
|
exec { 'restart_ovs_for_openibd' :
|
|
command => "service openvswitch-switch restart",
|
|
path => ['/usr/bin','/usr/sbin','/bin','/sbin','/usr/local/bin'],
|
|
refreshonly => true,
|
|
}
|
|
}
|
|
}
|