summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2016-08-26 16:09:56 +0300
committerMichael Polenchuk <mpolenchuk@mirantis.com>2016-08-29 18:17:02 +0300
commit0db45e140467be234b76a424577d25d88dddda7d (patch)
tree86c22644a03be262abc76e4f4f34f547dbfe39e8
parent2537604061e8f44f45f0fa5c187f448534bf59ca (diff)
Allocate dpdk socket memory
* allocate dpdk socket memory if configured * update main task to conform to F9.0+ Change-Id: I520b92cfbda083ad5781c8bc89bde9b43dcbfa0f
Notes
Notes (review): Code-Review+1: Michal Skalski <mskalski@mirantis.com> Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 30 Aug 2016 00:09:17 +0000 Reviewed-on: https://review.openstack.org/361171 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--deployment_scripts/install.sh8
-rw-r--r--deployment_scripts/puppet/manifests/ovs-install-compute.pp16
-rw-r--r--deployment_tasks.yaml8
3 files changed, 24 insertions, 8 deletions
diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index 67bd6cb..0b8332a 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -8,6 +8,7 @@ cd $INSTALL_HOME
8host=$1 8host=$1
9nsh=$2 9nsh=$2
10dpdk=$3 10dpdk=$3
11dpdk_socket_mem=$4
11 12
12 13
13if [ $nsh = 'true' ] 14if [ $nsh = 'true' ]
@@ -36,7 +37,14 @@ else
36 dpkg -i libdpdk0_16.07-1_amd64.deb 37 dpkg -i libdpdk0_16.07-1_amd64.deb
37 dpkg -i dpdk_16.07-1_amd64.deb 38 dpkg -i dpdk_16.07-1_amd64.deb
38 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb 39 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
40
41 dpdk_pages=$(($dpdk_socket_mem / 2))
42 sed "s/#*\(NR_2M_PAGES=\).*/\1${dpdk_pages}/" /etc/dpdk/dpdk.conf
43 service dpdk start
44
39 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true 45 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
46 [ -n $dpdk_socket_mem ] && vs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
47
40 service openvswitch-switch restart 48 service openvswitch-switch restart
41 fi 49 fi
42fi 50fi
diff --git a/deployment_scripts/puppet/manifests/ovs-install-compute.pp b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
index 3991454..27e96fb 100644
--- a/deployment_scripts/puppet/manifests/ovs-install-compute.pp
+++ b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
@@ -1,10 +1,16 @@
1$fuel_settings = parseyaml(file('/etc/astute.yaml')) 1# get options
2$master_ip = $::fuel_settings['master_ip'] 2$master_ip = hiera('master_ip')
3$install_nsh = $::fuel_settings['fuel-plugin-ovs']['install_nsh'] 3$ovs_settings = hiera('fuel-plugin-ovs')
4$install_dpdk = $::fuel_settings['fuel-plugin-ovs']['install_dpdk'] 4$dpdk = hiera('dpdk')
5
6$install_nsh = $ovs_settings['install_nsh']
7$install_dpdk = $ovs_settings['install_dpdk']
8$ovs_socket_mem = join(pick($dpdk['ovs_socket_mem'], []), ',')
9
10
5if $operatingsystem == 'Ubuntu' { 11if $operatingsystem == 'Ubuntu' {
6 exec { 'install ovs_nsh_dpdk': 12 exec { 'install ovs_nsh_dpdk':
7 command => "curl http://${master_ip}:8080/plugins/fuel-plugin-ovs-0.9/deployment_scripts/install.sh | bash -s ${master_ip} ${install_nsh} ${install_dpdk}", 13 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}",
8 path => "/usr/bin:/usr/sbin:/bin:/sbin"; 14 path => "/usr/bin:/usr/sbin:/bin:/sbin";
9 } 15 }
10} elsif $operatingsystem == 'CentOS' { 16} elsif $operatingsystem == 'CentOS' {
diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml
index d190afb..350ccb1 100644
--- a/deployment_tasks.yaml
+++ b/deployment_tasks.yaml
@@ -1,9 +1,11 @@
1- id: ovs_install_compute 1- id: ovs_install_compute
2 type: puppet 2 type: puppet
3 version: 2.0.0 3 version: 2.1.0
4 groups: [compute] 4 groups: [compute]
5 required_for: [pre_deployment_end] 5 requires: [allocate_hugepages]
6 requires: [pre_deployment_start] 6 required_for: [netconfig]
7 condition:
8 yaql_exp: changedAny($.get('fuel-plugin-ovs'), $.get('dpdk'))
7 parameters: 9 parameters:
8 puppet_manifest: puppet/manifests/ovs-install-compute.pp 10 puppet_manifest: puppet/manifests/ovs-install-compute.pp
9 puppet_modules: puppet/modules:/etc/puppet/modules 11 puppet_modules: puppet/modules:/etc/puppet/modules