Procházet zdrojové kódy

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 <Alexandru.Avadanii@enea.com>
pull/146/head
Alexandru Avadanii před 6 roky
rodič
revize
f6f0109b8b
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. +10
    -0
      linux/network/dpdk.sls

+ 10
- 0
linux/network/dpdk.sls Zobrazit soubor

@@ -52,6 +52,16 @@ openvswitch_dpdk_pkgs:
Requires=dpdk.service
After=dpdk.service

{# create drop-in dpdk post-start reload of openvswitch-nonetwork #}
/etc/systemd/system/dpdk.service.d/openvswitch-nonetwork.conf:
file.managed:
- makedirs: true
- require:
- pkg: openvswitch_dpdk_pkgs
- contents: |
[Service]
ExecStartPost=/bin/systemctl restart openvswitch-nonetwork

linux_network_dpdk_ovs_service:
cmd.run:
- name: "ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true"

Načítá se…
Zrušit
Uložit