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

2010-07-05 Thread ossjunkie
as i really needed a solution i did a dirty workaround for servers: move /sbin/shutdown to /sbin/shutdown.real place the attached script to /sbin/shutdown and make it executable you can do the same for /sbin/reboot to have it run even on reboot, halt, poweroff --force. you only need to change

[Bug 495394] Re: autostart almost always fails on boot time host

2010-07-05 Thread ossjunkie
yes it is still present on lucid server. after unsucessfully trying something like: start on (runlevel [2345] and networking) in the upstart script i also head for a dirty sleep in the pre-start script. Upstart experts needed! ** Changed in: libvirt (Ubuntu) Status: Fix Released =

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

2010-06-29 Thread ossjunkie
i reworked the changes by tomcrus (thanks for the elegance ;) and removed all reintroduced bashism. so here is the current of the core logic to shutdown guests. ** Attachment added: libvirt-guest-shutdown-core http://launchpadlibrarian.net/51116608/libvirt-guest-shutdown-core -- Should shut

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

2010-06-29 Thread ossjunkie
but i am still hanging on the upstart integration when using pre-stop in libvirt-bin. while the condition regarding the runlevel by tomcrus works great, it seems we are not able to simply delay the shutdown process with a simple sleep. in my case i only managed to get the pre-stop killed or make

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

2010-06-25 Thread ossjunkie
@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

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

2010-06-24 Thread ossjunkie
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.

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

2010-06-23 Thread ossjunkie
as this bug can corrupt guests i did an old school init script for my server, but that doesn't work as libvirt-bin got always stopped before (even at S01). so i removed all bashism like arrays and tried to create an upstart script. the core logic is done, but i need some help regarding upstart