[PKG-Openstack-devel] Bug#870001: Bug#870001: openvswitch-switch: switch takes a very long time to start or fails without upstream's SYSTEMCTL_SKIP_REDIRECT=yes

Nigel Kukard nkukard at lbsd.net
Tue Dec 19 00:06:14 UTC 2017



On 18/12/17 16:11, Thomas Goirand wrote:
> On 12/18/2017 12:41 AM, Michael Biebl wrote:
>> Am 17.12.2017 um 23:37 schrieb Thomas Goirand:
>>
>>> I've taken the maintenance of OpenVSwitch only very recently, I was not
>>> the one that wrote this. What does SYSTEMCTL_SKIP_REDIRECT does? I will
>>> indeed remove it as I trust you, but I'd like to understand first.
>> It's not really important what it does. The important thing is that it's
>> an internal implementation detail of the systemd lsb hook
>> /lib/lsb/init-functions.d/40-systemd which governs the redirection of
>> services and not a public API.
>> If you fiddle with that, /etc/init.d/foo start|stop|restart will no
>> longer be properly redirected to systemctl and the service is no longer
>> under systemd supervision.
>>
>>> Also, I tried to add some systemd service files, taking them from
>>> Ubuntu, but quickly reverted, as it failed badly. Michael, could you
>>> help me to write something better? Here's the commit reverting the
>>> previous addition of Ubuntu's .service files:
>>>
>>> https://anonscm.debian.org/cgit/openstack/third-party/openvswitch.git/commit/?id=02178a600660694bd9886652642e23952b9f93ac
>>>
>>> Any comment here?
>> If you have more specific questions, I might be able to help.
>>
>>
> Well, I guess the main question is, why do we have the problem as
> described in #880498 if I add the .service files.

The /etc/init.d/*.init files need to be modified, if I recall right the
if-*{up,down}.d scripts too, there is some subtle changes needed to
implement the method Ubuntu uses.

>
> Another question would be: do think doing 2 .service files like in
> Ubuntu a good idea? Wouldn't it be more simple to do one?

Ubuntu has pretty good Openstack implementation, how Open vSwitch is
basically fired up is if a network interface is onlined before OVS
starts, OVS is started. OVS is started after the networking service.

The openvswitch-switch.service file prevents the running on
/etc/init.d/openvswitch-switch during startup.

One of the challenges here is when OVS is started up, it may create
network devices, which triggers ifup ... if this happens during the
start of networking you have a problem, it is also a problem because the
ifup script tries to start the service if its not running. Under stretch
this collides horribly causing a very very long startup delay, OVS
starts starting, brings up a network device, ifup is run, which in turn
tries to start OVS while its already starting.

This is the reason why SYSTEMCTL_SKIP_REDIRECT is used.

There is also the other Open vSwitch services, and quite a few of them
depending on what you're doing. For instance on a controller,
ovsdb-server is started 3 times, once for SB, once for NB and once for
vswitchd to manage each of the databases.

-N



More information about the Openstack-devel mailing list