fedora package: fix systemd ordering and deps.
authorFlavio Leitner <fbl@redhat.com>
Thu, 9 Jan 2014 03:04:33 +0000 (01:04 -0200)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 9 Jan 2014 18:57:08 +0000 (10:57 -0800)
commitb49c106ef00438b1c59876dad90d00e8d6e7b627
treeeb1624e515522436477a99e2c4fce4d71da9df8e
parent615309cfb6992867251d01f1c34955568b3950ea
fedora package: fix systemd ordering and deps.

There is a chicken and egg issue where common OVS
configuration uses a controller which is only accessible
via the network. So starting OVS before network.target
would break those configurations.

However, the network doesn't come up after boot because
OVS isn't started until after the network scripts tries
to configure the ovs.

This is partially fixed by commits:
   commit: 602453000e28ec1076c0482ce13c284765a84409
   rhel: Automatically start openvswitch service before bringing an ovs interfa

   commit: 3214851c31538e8690e31f95702f8927a8c0838b
   rhel: Add OVSREQUIRES to automatically bring up OpenFlow interface dependencies

But still there is the dependency issue between network.target
and openvswitch which this patch fixes it.  It provides two systemd
service units. One to run at any time (openvswitch-nonetwork.service)
which runs 'ovs-ctl start' and the other one (openvswith.service) to
run after network.target which works as a frontend to the admin.

The openvswitch-nonetwork.service is used internally by the
'ifup-ovs/ifdown-ovs' scripts when adding or removing ports to
the bridge or when the openvswitch.service is enabled by the admin.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
rhel/automake.mk
rhel/etc_sysconfig_network-scripts_ifdown-ovs
rhel/etc_sysconfig_network-scripts_ifup-ovs
rhel/openvswitch-fedora.spec.in
rhel/usr_lib_systemd_system_openvswitch-nonetwork.service [new file with mode: 0644]
rhel/usr_lib_systemd_system_openvswitch.service
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template [new file with mode: 0644]