Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OVS-DPDK systemd unit deps #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexandruavadanii
Copy link
Contributor

This took me a few hours to sort out.
The first bit (missing dependency on dpdk service) is quite straightforward, and also described by the last comments in [1].
The second part - using systemctl in a post-start hook - definitely not clean, but I couldn't find anything better in systemd that works for this corner case of interleaved dependencies ...

[1] https://software.intel.com/en-us/forums/networking/topic/611366

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
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>
@alexandruavadanii
Copy link
Contributor Author

The OVS documentation recommends not to touch openvswitch-nonetwork directly, so an alternative method would be for dpdk.service to wait for openvswitch-switch.service (counterintuitive), and when dpdk.service is done, it can restart openvswitch-switch.service directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant