[ovs-dev] Bug#701760: Bug#701760: [PATCH] debian: Stop openvswitch after VMs managed by libvirt.

Ansis Atteka aatteka at nicira.com
Thu May 22 20:18:12 UTC 2014


I haven't looked into Debian, but I have Ubuntu 14.04 with libvirt 1.2.1:
aatteka at aatteka-MacBookPro:~$ service libvirt-bin
Usage: /etc/init.d/libvirt-bin COMMAND
aatteka at aatteka-MacBookPro:~$ service libvirt-guests
libvirt-guests: unrecognized service

As you can see from output above my Ubuntu system does not have
libvirt-guests service. I think that this is because libvirt debian
packages for Ubuntu are not using init scripts from the libvirt git
tree. I don't know if this is different on Debian distribution.

If we will still decide to add a libvirt dependency to openvswitch
project, then I think that libvirt-bin might be a better candidate
than libvirt-guests, because of following reasons:
1. libvirt-bin corresponds to the libvirtd daemon. libvirtd daemon is
the one doing the actual ovs-vsctl calls. libvirt-guests service seems
more related to guest status. This could have implications if after
shutting down VMs libvirtd still tries to do something else (e.g.
remove bridges with ovs-vsctl).
2. libvirt-bin service seems to be available on all platforms compared
to libvirt-guests.

However, I think that the best approach would be by adding this
dependency to libvirt service. Otherwise, openvswitch-switch service
would need to know all other services that are using it. I think that
dependencies should be the reverse way, because libvirtd is actually
the one interested that openvswitch is running.

On Tue, May 20, 2014 at 8:09 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, May 20, 2014 at 07:24:35AM -0700, Ben Pfaff wrote:
>> On Tue, May 20, 2014 at 10:29:11AM +0900, YAMAMOTO Takashi wrote:
>> > > On Mon, Mar 31, 2014 at 08:37:48AM -0700, Ben Pfaff wrote:
>> > >> When openvswitch stops before libvirt shuts down VMs, it makes it hard for
>> > >> libvirt to remove virtual network interfaces (ovs-vsctl cannot access the
>> > >> database socket, which has been removed).  This commit should ensure that
>> > >> the VMs get shut down before openvswitch.
>> > >>
>> > >> CC: 701760 at bugs.debian.org
>> > >> Reported-by: Ernesto Domato <edomat at gmail.com>
>> > >> Suggested-by: Lukasz Szotek <szotman at gmail.com>
>> > >> Signed-off-by: Ben Pfaff <blp at nicira.com>
>> > >
>> > > This still needs a review (from ovs-dev).
>> >
>> > is this still useful?
>> > my installation of ubuntu 13.10 doesn't seem to have libvirt-guests.
>>
>> Ansis told me the same thing.  It seems package names have changed from
>> the version of libvirt that the reporter uses, to the version of libvirt
>> that is currently in the Debian archive.
>
> Actually, looking at the latest version of libvirt in the Debian
> archive, version 1.2.4-3, I see that it has /etc/init.d/libvirt-guests,
> same as previous versions.  Ansis and Yamamoto-san, are you aware that
> the dependencies in these init.d files are the names of init.d scripts,
> not the names of packages?  So I think that this change will have the
> desired effect, considering Ansis's comment below as a separate topic:
>
>> But Ansis also brought up the point that it might make more sense for
>> libvirt to add this dependency in the reverse direction.  I will consult
>> with the libvirt team (probably by reassigning this bug to libvirt with
>> a query).



More information about the dev mailing list