>
>
> what do you think it would bring to add this oneshot service as I see it
> only launch the openvswitch-nonetwork.service?
>

If I remember correctly, fedora split this for the following reasons.

 openvswitch service will start after network. But network will look at
ifcfg-* scripts. If one of those scripts has openvswitch device to be
configured, it can't start it because openvswitch is not yet started.

So Fedora, added the following:
https://github.com/openvswitch/ovs/blob/master/rhel/etc_sysconfig_network-scripts_ifup-ovs#L63

What the above does is that it will force start
openvswitch-nonetwork.service even before openvswitch.service starts.




>
>
> On 01/08/16 16:51, Ian Pilcher wrote:
>
> On 01/08/2016 09:27 AM, Benoît wrote:
>
> it is using /etc/systemd/network
> and to start ovs :
> /etc/systemd/system/multi-user.target.wants/ovs-vswitchd.service
> [Unit]
> Description    = Open vSwitch Daemon
> Documentation  = man:ovs-vswitchd
> Wants          = network.target
> Before         = network.target
> Requires       = ovsdb-server.service
> After          = ovsdb-server.service
>
> [Service]
> ExecStartPre = /sbin/modprobe openvswitch
> PIDFile = /run/openvswitch/ovs-vswitchd.pid
> ExecStart = /usr/sbin/ovs-vswitchd
> --pidfile=/run/openvswitch/ovs-vswitchd.pid
>
>
> It looks like Arch hasn't split the Open vSwitch service into pre- and
> post-network stages.  Here's what Fedora does:
>
> $ cat openvswitch.service
> [Unit]
> Description=Open vSwitch
> After=syslog.target network.target openvswitch-nonetwork.service
> Requires=openvswitch-nonetwork.service
>
> [Service]
> Type=oneshot
> ExecStart=/bin/true
> ExecStop=/bin/true
> RemainAfterExit=yes
>
> [Install]
> WantedBy=multi-user.target
>
>
> $ cat openvswitch-nonetwork.service
> [Unit]
> Description=Open vSwitch Internal Unit
> After=syslog.target
> PartOf=openvswitch.service
> Wants=openvswitch.service
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> EnvironmentFile=-/etc/sysconfig/openvswitch
> ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \
>           --system-id=random $OPTIONS
> ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
> RuntimeDirectory=openvswitch
> RuntimeDirectoryMode=0755
>
>
>
> _______________________________________________
> discuss mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/discuss
>
>
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to