Skip to content

Commit f6f0109

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. To avoid another race condition leading to dead openvswitch-switch, restart the openvswitch-nonetwork service directly. Signed-off-by: Alexandru Avadanii <[email protected]>
1 parent ce9242e commit f6f0109

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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-nonetwork #}
56+
/etc/systemd/system/dpdk.service.d/openvswitch-nonetwork.conf:
57+
file.managed:
58+
- makedirs: true
59+
- require:
60+
- pkg: openvswitch_dpdk_pkgs
61+
- contents: |
62+
[Service]
63+
ExecStartPost=/bin/systemctl restart openvswitch-nonetwork
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)