I have modified /usr/lib/systemd/system/wicked.service at the ExecStop line to read:
ExecStop=/usr/bin/systemctl stop openvswitch.service; /usr/sbin/wicked --systemd ifdown all
This does work, and does solve my problem. My question is:
Is this a legitimate syntax (it obviously works) or is there a better approach to insure that the openvswitch.service stops before the interfaces are downed.
AFAIK this should be triggered by Before= or After= statements. But, if this works now, I’d first do some serious studying on systemd, before changing it.
Yes. Although it means that you now have two services to stop instead of one, so timeouts systemd applies are wrong. Also any “systemctl daemon-reload” run concurrently (there are too many of them unfortunately) would terminate the first systemctl, thus it is open to race condition.
or is there a better approach
I already told you - use STARTMODE=nfsroot for your bridge.
Actually I’d say it is a bug in wicked - it should not destroy interfaces that it did not create. I.e. your case should work by omitting OVS_* variables and treating OVS interfaces just like any other. Care to file bug report?
Usually people write these options to start, and pay less attention to stopping.
You’ll probably want to carefully pick through the info on this page to make sure very detail is covered.
I’m guessing that properly <combining> Requires = and After = other referenced Unit files for those services should be the proper syntax.
Thank you for the link.I did read the manpages. I solved it a different way with arvidjarr’s advice in the post below, and submitted a bug report as advised.