Skip to content

Commit 1ba71ad

Browse files
authored
Merge pull request #145 from alexandruavadanii/ovs-dpdk-alternatives
ovs-dpdk should work without system reboot
2 parents 6a04d27 + 305b6b0 commit 1ba71ad

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

linux/network/dpdk.sls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ linux_dpdk_pkgs:
99
linux_dpdk_kernel_module:
1010
kmod.present:
1111
- name: {{ network.dpdk.driver }}
12+
- persist: true
1213
- require:
1314
- pkg: linux_dpdk_pkgs
1415
- require_in:
@@ -73,6 +74,15 @@ linux_network_dpdk_ovs_option_{{ option }}:
7374
7475
{%- endfor %}
7576
77+
openvswitch_dpdk_ovs_alternative:
78+
alternatives.remove:
79+
- name: ovs-vswitchd
80+
- path: /usr/lib/openvswitch-switch/ovs-vswitchd
81+
- require:
82+
- pkg: openvswitch_dpdk_pkgs
83+
- watch_in:
84+
- service: service_openvswitch
85+
7686
service_openvswitch:
7787
service.running:
7888
- name: openvswitch-switch

linux/system/hugepages.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ hugepages_mount_{{ hugepages_type }}:
2929
- mkmnt: true
3030
- opts: mode=775,pagesize={{ hugepages.size }}
3131
32+
# Make hugepages available right away with a temporary systctl write
33+
# This will be handled via krn args after reboot, so don't use `sysctl.present`
34+
hugepages_sysctl_vm_nr_hugepages:
35+
cmd.run:
36+
- name: "sysctl vm.nr_hugepages={{ hugepages.count }}"
37+
- unless: "sysctl vm.nr_hugepages | grep -qE '{{ hugepages.count }}'"
38+
3239
{%- endif %}
3340
3441
{%- endfor %}

0 commit comments

Comments
 (0)