Start dpdk before ovs

Change-Id: Ie69e95bcdf811bb584cb5c1d1018296c82ad47f3
Closes-Bug: #1652937
This commit is contained in:
Mikhail 2017-01-11 14:17:20 +04:00 committed by Mikhail Zhnichkov
parent 2346df7afd
commit 17052f4fae
3 changed files with 21 additions and 0 deletions

View File

@ -43,6 +43,7 @@ class l23network::l2::dpdk (
$dpdk_dir = $::l23network::params::dpdk_dir,
$dpdk_conf_file = $::l23network::params::dpdk_conf_file,
$dpdk_interfaces_file = $::l23network::params::dpdk_interfaces_file,
$ovs_default_file = $::l23network::params::ovs_default_file,
$install_ovs = $::l23network::l2::install_ovs,
$ensure_package = 'present',
) inherits ::l23network::params {
@ -68,6 +69,10 @@ class l23network::l2::dpdk (
}
File[$dpdk_interfaces_file] ~> Service['dpdk']
File[$dpdk_interfaces_file] ~> Service['openvswitch-service']
if $ovs_default_file {
File[$dpdk_interfaces_file] -> File[$ovs_default_file]
}
} else {
warning('DPDK was not configured')
}
@ -91,12 +96,24 @@ class l23network::l2::dpdk (
hasstatus => true,
} -> Anchor['l23network::l2::dpdk']
# Configure OpenVSwitch to use DPDK
if $ovs_default_file {
file {$ovs_default_file:
ensure => 'present',
content => template('l23network/openvswitch_default_Debian.erb'),
} ~> Service['openvswitch-service']
}
# Install DPDK-enabled OpenVSwitch
if $_install_dpdk and $install_ovs and $ovs_dpdk_package_name {
package {'openvswitch-dpdk':
ensure => $ensure_package,
name => $ovs_dpdk_package_name,
} ~> Service['openvswitch-service']
if $ovs_default_file {
Package['openvswitch-dpdk'] -> File[$ovs_default_file]
}
} else {
warning('OpenVSwitch DPDK was not installed')
}

View File

@ -9,6 +9,7 @@ class l23network::params {
$interfaces_file = '/etc/network/interfaces'
$ovs_service_name = 'openvswitch-switch'
$ovs_status_cmd = '/etc/init.d/openvswitch-switch status'
$ovs_default_file = '/etc/default/openvswitch-switch'
$lnx_vlan_tools = 'vlan'
$lnx_bond_tools = 'ifenslave'
$lnx_ethernet_tools = 'ethtool'
@ -34,6 +35,7 @@ class l23network::params {
$interfaces_file = undef
$ovs_service_name = 'openvswitch'
$ovs_status_cmd = '/etc/init.d/openvswitch status'
$ovs_default_file = undef
$lnx_vlan_tools = undef
$lnx_bond_tools = undef
$lnx_ethernet_tools = 'ethtool'
@ -61,6 +63,7 @@ class l23network::params {
$interfaces_dir = '/tmp/1'
$interfaces_file = undef
$ovs_service_name = undef
$ovs_default_file = undef
$lnx_vlan_tools = undef
$lnx_bond_tools = undef
$lnx_ethernet_tools = undef

View File

@ -0,0 +1 @@
/etc/init.d/dpdk start