Browse Source

Allocate dpdk socket memory

* allocate dpdk socket memory if configured
* update main task to conform to F9.0+

Change-Id: I520b92cfbda083ad5781c8bc89bde9b43dcbfa0f
Michael Polenchuk 2 years ago
parent
commit
0db45e1404

+ 8
- 0
deployment_scripts/install.sh View File

@@ -8,6 +8,7 @@ cd $INSTALL_HOME
8 8
 host=$1
9 9
 nsh=$2
10 10
 dpdk=$3
11
+dpdk_socket_mem=$4
11 12
 
12 13
 
13 14
 if [ $nsh = 'true' ]
@@ -36,7 +37,14 @@ else
36 37
         dpkg -i libdpdk0_16.07-1_amd64.deb
37 38
         dpkg -i dpdk_16.07-1_amd64.deb
38 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 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 48
         service openvswitch-switch restart
41 49
     fi
42 50
 fi

+ 11
- 5
deployment_scripts/puppet/manifests/ovs-install-compute.pp View File

@@ -1,10 +1,16 @@
1
-$fuel_settings = parseyaml(file('/etc/astute.yaml'))
2
-$master_ip = $::fuel_settings['master_ip']
3
-$install_nsh = $::fuel_settings['fuel-plugin-ovs']['install_nsh']
4
-$install_dpdk = $::fuel_settings['fuel-plugin-ovs']['install_dpdk']
1
+# get options
2
+$master_ip      = hiera('master_ip')
3
+$ovs_settings   = hiera('fuel-plugin-ovs')
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
+
5 11
 if $operatingsystem == 'Ubuntu' {
6 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 14
         path   => "/usr/bin:/usr/sbin:/bin:/sbin";
9 15
     }
10 16
 } elsif $operatingsystem == 'CentOS' {

+ 5
- 3
deployment_tasks.yaml View File

@@ -1,9 +1,11 @@
1 1
 - id: ovs_install_compute
2 2
   type: puppet
3
-  version: 2.0.0
3
+  version: 2.1.0
4 4
   groups: [compute]
5
-  required_for: [pre_deployment_end]
6
-  requires: [pre_deployment_start]
5
+  requires: [allocate_hugepages]
6
+  required_for: [netconfig]
7
+  condition:
8
+    yaql_exp: changedAny($.get('fuel-plugin-ovs'), $.get('dpdk'))
7 9
   parameters:
8 10
     puppet_manifest: puppet/manifests/ovs-install-compute.pp
9 11
     puppet_modules: puppet/modules:/etc/puppet/modules

Loading…
Cancel
Save