summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-09-09 03:44:00 +0200
committerMichal Skalski <mskalski@mirantis.com>2016-09-09 06:32:22 +0200
commitc1e14c9412d7f683918a10f7a336f13c1a0b53dc (patch)
tree73490e719c770040eb1d709f60fbe633257260c0
parentcde514abaa5a998b26aada38d989cd5ca6ebd3f2 (diff)
Allocate enough memeory for dpdk hugepages
Rely on fuel allocate_hugepages task and use dpdk init script only for mounting hugepages. Change-Id: Id561effae09aca21d82868424f61794e8fb03c32 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Notes
Notes (review): Code-Review+1: Michael Polenchuk <mpolenchuk@mirantis.com> Code-Review+1: Billy O'Mahony <billy.omahony@gmail.com> Code-Review+2: Michal Skalski <mskalski@mirantis.com> Workflow+1: Michal Skalski <mskalski@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 09 Sep 2016 12:34:19 +0000 Reviewed-on: https://review.openstack.org/367720 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--deployment_scripts/install.sh5
-rw-r--r--deployment_scripts/puppet/manifests/ovs-install-compute.pp2
2 files changed, 3 insertions, 4 deletions
diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index 60b351c..efbed72 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -10,7 +10,6 @@ nsh=$2
10dpdk=$3 10dpdk=$3
11dpdk_socket_mem=${4:-''} 11dpdk_socket_mem=${4:-''}
12 12
13
14if [ $nsh = 'true' ] 13if [ $nsh = 'true' ]
15then 14then
16 curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv 15 curl http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv
@@ -38,8 +37,8 @@ else
38 dpkg -i dpdk_16.07-1_amd64.deb 37 dpkg -i dpdk_16.07-1_amd64.deb
39 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb 38 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
40 39
41 dpdk_pages=$(($dpdk_socket_mem / 2)) 40 #Set to 0, dpdk init script mount hugepages but don't change current allocation
42 sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\1${dpdk_pages}/" /etc/dpdk/dpdk.conf 41 sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf
43 service dpdk start 42 service dpdk start
44 43
45 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true 44 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
diff --git a/deployment_scripts/puppet/manifests/ovs-install-compute.pp b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
index 27e96fb..d10a37c 100644
--- a/deployment_scripts/puppet/manifests/ovs-install-compute.pp
+++ b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
@@ -11,7 +11,7 @@ $ovs_socket_mem = join(pick($dpdk['ovs_socket_mem'], []), ',')
11if $operatingsystem == 'Ubuntu' { 11if $operatingsystem == 'Ubuntu' {
12 exec { 'install ovs_nsh_dpdk': 12 exec { 'install ovs_nsh_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}", 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}",
14 path => "/usr/bin:/usr/sbin:/bin:/sbin"; 14 path => "/usr/bin:/usr/sbin:/bin:/sbin",
15 } 15 }
16} elsif $operatingsystem == 'CentOS' { 16} elsif $operatingsystem == 'CentOS' {
17} 17}