Comment 17 for bug 350936

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 350936] Re: Should shut down domains on system shutdown

On Thu, Jun 24, 2010 at 01:38:04PM -0000, ossjunkie wrote:
> thanks for the hint, but after trying i found that "start on (runlevel
> [06] and stopping libvirt-bin)" should do the trick. but i still got
> problems as i can use libvirt at first in the upstart job, but when
> testing the timeout loop it seems that libvirt-bin still stopped before
> the script finished.

That shouldn't happen. You're doing the right thing with upstart. I
double checked with one of the experts. :) Something else seems to be
killing libvirt-bin. Try putting a a post-stop thing in the libvirt-bin
job to log when it's being killed, just to double check.

> why does libvirt-bin still stop before the libvirt-shutdown-guests job
> has finished the script?

Good question. Upstart shouldn't be killing it, but something else
might. I can't imagine what, though.

> do i have to modify the libvirt-bin job to wait for
> libvirt-shutdown-guests?

Nope.

> does upstart jobs also receive some sort of kill signal? does upstart
> in general allow to delay the shutdown just by a loop in the script of
> a upstart job?

Yes.

> BTW i have no problems when testing it with "initctl start libvirt-
> shutdown-guests", so any testing needs to done on real shutdown ;(

> ** Attachment added: "libvirt-shutdown-guests.conf"
> http://launchpadlibrarian.net/50850625/libvirt-shutdown-guests.conf

The script still has some debugging stuff in it. That would need to go
away before we can include this in the package.

Thanks for your efforts so far! This has been a problem for a looong
time.

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