On Wed, Jul 06, 2016 at 02:40:01PM -0400, Aaron Conole wrote: > Flavio Leitner <f...@sysclose.org> writes: > > > On Fri, Jul 01, 2016 at 05:26:22PM -0400, Aaron Conole wrote: > >> diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs > >> b/rhel/etc_sysconfig_network-scripts_ifup-ovs > >> index f3fc05e..9b2efbb 100755 > >> --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs > >> +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs > >> @@ -60,15 +60,15 @@ fi > >> fi > >> done > >> > >> -SERVICE_UNIT=/usr/lib/systemd/system/openvswitch-nonetwork.service > >> +SERVICE_UNIT=/usr/lib/systemd/system/ovsdb-server.service > >> if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then > >> - if ! systemctl --quiet is-active openvswitch-nonetwork.service; then > >> - systemctl start openvswitch-nonetwork.service > >> - fi > >> + if ! systemctl --quiet is-active ovsdb-server.service; then > >> + systemctl start ovsdb-server.service > >> + fi > > > > However, I am not sure that is correct here because when we run > > 'ifup ovsbr0' and it has DHCP on it, the vswitchd is not running yet > > and dhcp would fail. It seems we need to start the whole service > > (openvswitch.service) at this point. > > Well, ovsdb-server is the whole service but it has a weird name. This > is just a rename; but I agree it's confusing and can just squash the two > together if you want. Otherwise, you're right and 3/3 would need to > change this to openvswitch.service
Exactly the point. We need full service running because we will actually use the interface further down in the script. [...] > >> diff --git a/rhel/usr_lib_systemd_system_openvswitch.service > >> b/rhel/usr_lib_systemd_system_openvswitch.service > >> index f0bc16f..96c697b 100644 > >> --- a/rhel/usr_lib_systemd_system_openvswitch.service > >> +++ b/rhel/usr_lib_systemd_system_openvswitch.service > >> @@ -1,7 +1,7 @@ > >> [Unit] > >> Description=Open vSwitch > >> -After=syslog.target network.target openvswitch-nonetwork.service > >> -Requires=openvswitch-nonetwork.service > >> +After=syslog.target network.target ovsdb-server.service > >> +Requires=ovsdb-server.service > > > > If we change the above ifup-ovs to start the ovs service, we also > > need to change the 'After' line to not require network.target. > > Okay. Why is that? If I recall correctly, sysv network script provides the $network but the ifup-ovs is executed as part if it, so it can't run after. Also that OVS does provide network connectivity so using After= will tell systemd to shutdown OVS before stopping the network and that will break all apps that need to terminate before the network goes down. I am glad to be proved wrong though :-) -- fbl _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev