Skip to content

Commit 5118cf1

Browse files
committed
network.dpdk: Restart openvswitch-switch for dpdk
Current state of distro packages systemd unit deps (extract): - dpdk.service wants network-pre.target; - network-pre.target wants openvswitch-nonetwork.service; - openvswitch-switch.service wants openvswitch-nonetwork.service, network.target; However, openvswitch-nonetwork requires ports to be bound already, handled by dpdk service. On system boot, since openvswitch-nonetwork starts before dpdk (succesfully, despite the binding issue), and the ulterior start of openvswitch-switch does not trigger a restart, the system is left in a slightly broken state, fixed by restarting either of the openvswitch-* services. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
1 parent ce9242e commit 5118cf1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

linux/network/dpdk.sls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ openvswitch_dpdk_pkgs:
5252
Requires=dpdk.service
5353
After=dpdk.service
5454
55+
{# create drop-in dpdk post-start reload of openvswitch-switch #}
56+
/etc/systemd/system/dpdk.service.d/openvswitch-switch.conf:
57+
file.managed:
58+
- makedirs: true
59+
- require:
60+
- pkg: openvswitch_dpdk_pkgs
61+
- contents: |
62+
[Service]
63+
ExecStartPost=/bin/systemctl restart openvswitch-switch
64+
5565
linux_network_dpdk_ovs_service:
5666
cmd.run:
5767
- name: "ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true"

0 commit comments

Comments
 (0)