Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alexandruavadanii
Copy link

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

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]>
@alexandruavadanii
Copy link
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.

2 participants