[Bug 350936] Re: Should shut down domains on system shutdown

Soren Hansen soren at ubuntu.com
Fri Jun 25 13:18:38 BST 2010


On Fri, Jun 25, 2010 at 10:32:07AM -0000, ossjunkie wrote:
> @soren: as i simple don't know how to trigger it only on shutdown, as
> the premise was it should run on regular stop.  but i know it may ease
> the situation and would like to do so. do you know some solution here.
> maybe we could do a simple condition that checks for an enviromental
> stuff thats only present on shutdown/reboot and is a reliable source.
> and yes i left some ugly debugging stuff in, but because it isn't
> ready so far ;)

I actually had a modified version of libvirt's init script that did what
you're doing. It checked whether $0 was called K??libvirt-bin, in which
case it was being called as part of a runlevel change. The equivalent in
the world of Upstart is probably something like the UPSTART_EVENTS
environment variable. It will not be set if you're running "stop
libvirt-bin", but will be set if the libvirt-bin job is being stopped as
a result of an Upstart event.

> regarding the killing by /etc/init.d/sendsings we could easily test
> when the VMs got killed and how to prevent when libvirtd would be
> still accessable. so i would say we should get the upstart things
> right first and then go on with that. maybe we could try to track and
> bound the pids of the guest somehow to the upstart job (in case we
> keep it seperate) and prevent it that way.

libvirt makes sure qemu creates pidfiles for kvm processes anyway.  It
shouldn't be hard at all to make sendsigs omit them from its killing
spree.

-- 
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/

-- 
Should shut down domains on system shutdown
https://bugs.launchpad.net/bugs/350936
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.



More information about the Ubuntu-server-bugs mailing list