Start dpdk before ovs
Change-Id: Ie69e95bcdf811bb584cb5c1d1018296c82ad47f3 Closes-Bug: #1652937
This commit is contained in:
parent
4f691b399f
commit
f8e27d9323
|
@ -43,6 +43,7 @@ class l23network::l2::dpdk (
|
||||||
$dpdk_dir = $::l23network::params::dpdk_dir,
|
$dpdk_dir = $::l23network::params::dpdk_dir,
|
||||||
$dpdk_conf_file = $::l23network::params::dpdk_conf_file,
|
$dpdk_conf_file = $::l23network::params::dpdk_conf_file,
|
||||||
$dpdk_interfaces_file = $::l23network::params::dpdk_interfaces_file,
|
$dpdk_interfaces_file = $::l23network::params::dpdk_interfaces_file,
|
||||||
|
$ovs_default_file = $::l23network::params::ovs_default_file,
|
||||||
$install_ovs = $::l23network::l2::install_ovs,
|
$install_ovs = $::l23network::l2::install_ovs,
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
) inherits ::l23network::params {
|
) inherits ::l23network::params {
|
||||||
|
@ -68,6 +69,10 @@ class l23network::l2::dpdk (
|
||||||
}
|
}
|
||||||
File[$dpdk_interfaces_file] ~> Service['dpdk']
|
File[$dpdk_interfaces_file] ~> Service['dpdk']
|
||||||
File[$dpdk_interfaces_file] ~> Service['openvswitch-service']
|
File[$dpdk_interfaces_file] ~> Service['openvswitch-service']
|
||||||
|
|
||||||
|
if $ovs_default_file {
|
||||||
|
File[$dpdk_interfaces_file] -> File[$ovs_default_file]
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
warning('DPDK was not configured')
|
warning('DPDK was not configured')
|
||||||
}
|
}
|
||||||
|
@ -91,12 +96,24 @@ class l23network::l2::dpdk (
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
} -> Anchor['l23network::l2::dpdk']
|
} -> 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
|
# Install DPDK-enabled OpenVSwitch
|
||||||
if $_install_dpdk and $install_ovs and $ovs_dpdk_package_name {
|
if $_install_dpdk and $install_ovs and $ovs_dpdk_package_name {
|
||||||
package {'openvswitch-dpdk':
|
package {'openvswitch-dpdk':
|
||||||
ensure => $ensure_package,
|
ensure => $ensure_package,
|
||||||
name => $ovs_dpdk_package_name,
|
name => $ovs_dpdk_package_name,
|
||||||
} ~> Service['openvswitch-service']
|
} ~> Service['openvswitch-service']
|
||||||
|
|
||||||
|
if $ovs_default_file {
|
||||||
|
Package['openvswitch-dpdk'] -> File[$ovs_default_file]
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
warning('OpenVSwitch DPDK was not installed')
|
warning('OpenVSwitch DPDK was not installed')
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ class l23network::params {
|
||||||
$interfaces_file = '/etc/network/interfaces'
|
$interfaces_file = '/etc/network/interfaces'
|
||||||
$ovs_service_name = 'openvswitch-switch'
|
$ovs_service_name = 'openvswitch-switch'
|
||||||
$ovs_status_cmd = '/etc/init.d/openvswitch-switch status'
|
$ovs_status_cmd = '/etc/init.d/openvswitch-switch status'
|
||||||
|
$ovs_default_file = '/etc/default/openvswitch-switch'
|
||||||
$lnx_vlan_tools = 'vlan'
|
$lnx_vlan_tools = 'vlan'
|
||||||
$lnx_bond_tools = 'ifenslave'
|
$lnx_bond_tools = 'ifenslave'
|
||||||
$lnx_ethernet_tools = 'ethtool'
|
$lnx_ethernet_tools = 'ethtool'
|
||||||
|
@ -34,6 +35,7 @@ class l23network::params {
|
||||||
$interfaces_file = undef
|
$interfaces_file = undef
|
||||||
$ovs_service_name = 'openvswitch'
|
$ovs_service_name = 'openvswitch'
|
||||||
$ovs_status_cmd = '/etc/init.d/openvswitch status'
|
$ovs_status_cmd = '/etc/init.d/openvswitch status'
|
||||||
|
$ovs_default_file = undef
|
||||||
$lnx_vlan_tools = undef
|
$lnx_vlan_tools = undef
|
||||||
$lnx_bond_tools = undef
|
$lnx_bond_tools = undef
|
||||||
$lnx_ethernet_tools = 'ethtool'
|
$lnx_ethernet_tools = 'ethtool'
|
||||||
|
@ -61,6 +63,7 @@ class l23network::params {
|
||||||
$interfaces_dir = '/tmp/1'
|
$interfaces_dir = '/tmp/1'
|
||||||
$interfaces_file = undef
|
$interfaces_file = undef
|
||||||
$ovs_service_name = undef
|
$ovs_service_name = undef
|
||||||
|
$ovs_default_file = undef
|
||||||
$lnx_vlan_tools = undef
|
$lnx_vlan_tools = undef
|
||||||
$lnx_bond_tools = undef
|
$lnx_bond_tools = undef
|
||||||
$lnx_ethernet_tools = undef
|
$lnx_ethernet_tools = undef
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/init.d/dpdk start
|
Loading…
Reference in New Issue