Allocate dpdk socket memory
* allocate dpdk socket memory if configured * update main task to conform to F9.0+ Change-Id: I520b92cfbda083ad5781c8bc89bde9b43dcbfa0f
This commit is contained in:
parent
2537604061
commit
0db45e1404
|
@ -8,6 +8,7 @@ cd $INSTALL_HOME
|
||||||
host=$1
|
host=$1
|
||||||
nsh=$2
|
nsh=$2
|
||||||
dpdk=$3
|
dpdk=$3
|
||||||
|
dpdk_socket_mem=$4
|
||||||
|
|
||||||
|
|
||||||
if [ $nsh = 'true' ]
|
if [ $nsh = 'true' ]
|
||||||
|
@ -36,7 +37,14 @@ else
|
||||||
dpkg -i libdpdk0_16.07-1_amd64.deb
|
dpkg -i libdpdk0_16.07-1_amd64.deb
|
||||||
dpkg -i dpdk_16.07-1_amd64.deb
|
dpkg -i dpdk_16.07-1_amd64.deb
|
||||||
dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
|
dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
|
||||||
|
|
||||||
|
dpdk_pages=$(($dpdk_socket_mem / 2))
|
||||||
|
sed "s/#*\(NR_2M_PAGES=\).*/\1${dpdk_pages}/" /etc/dpdk/dpdk.conf
|
||||||
|
service dpdk start
|
||||||
|
|
||||||
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
|
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
|
||||||
|
[ -n $dpdk_socket_mem ] && vs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
|
||||||
|
|
||||||
service openvswitch-switch restart
|
service openvswitch-switch restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
|
# get options
|
||||||
$master_ip = $::fuel_settings['master_ip']
|
$master_ip = hiera('master_ip')
|
||||||
$install_nsh = $::fuel_settings['fuel-plugin-ovs']['install_nsh']
|
$ovs_settings = hiera('fuel-plugin-ovs')
|
||||||
$install_dpdk = $::fuel_settings['fuel-plugin-ovs']['install_dpdk']
|
$dpdk = hiera('dpdk')
|
||||||
|
|
||||||
|
$install_nsh = $ovs_settings['install_nsh']
|
||||||
|
$install_dpdk = $ovs_settings['install_dpdk']
|
||||||
|
$ovs_socket_mem = join(pick($dpdk['ovs_socket_mem'], []), ',')
|
||||||
|
|
||||||
|
|
||||||
if $operatingsystem == 'Ubuntu' {
|
if $operatingsystem == 'Ubuntu' {
|
||||||
exec { 'install ovs_nsh_dpdk':
|
exec { 'install ovs_nsh_dpdk':
|
||||||
command => "curl http://${master_ip}:8080/plugins/fuel-plugin-ovs-0.9/deployment_scripts/install.sh | bash -s ${master_ip} ${install_nsh} ${install_dpdk}",
|
command => "curl http://${master_ip}:8080/plugins/fuel-plugin-ovs-0.9/deployment_scripts/install.sh | bash -s ${master_ip} ${install_nsh} ${install_dpdk} ${ovs_socket_mem}",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin";
|
path => "/usr/bin:/usr/sbin:/bin:/sbin";
|
||||||
}
|
}
|
||||||
} elsif $operatingsystem == 'CentOS' {
|
} elsif $operatingsystem == 'CentOS' {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
- id: ovs_install_compute
|
- id: ovs_install_compute
|
||||||
type: puppet
|
type: puppet
|
||||||
version: 2.0.0
|
version: 2.1.0
|
||||||
groups: [compute]
|
groups: [compute]
|
||||||
required_for: [pre_deployment_end]
|
requires: [allocate_hugepages]
|
||||||
requires: [pre_deployment_start]
|
required_for: [netconfig]
|
||||||
|
condition:
|
||||||
|
yaql_exp: changedAny($.get('fuel-plugin-ovs'), $.get('dpdk'))
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/ovs-install-compute.pp
|
puppet_manifest: puppet/manifests/ovs-install-compute.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
|
Loading…
Reference in New Issue