[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 REALCMD to
/sbin/reboot.real

this way we could at least just run reboot and shutdown again
without worring about the guests.

** Attachment added: shutdown
   http://launchpadlibrarian.net/51414161/shutdown

-- 
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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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 = Confirmed

-- 
autostart almost always fails on boot time host
https://bugs.launchpad.net/bugs/495394
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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 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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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 the reboot hang forever. i also tried exec sleep. there
is also some stuff in /etc/init.d/sendsigs that might be of interest.

for anyone who like to do the puzzle just make the timeout work in pre-
stop and we should have the solution by placing the core script into it.

** Attachment added: libvirt-bin.conf
   http://launchpadlibrarian.net/51117052/libvirt-bin.conf

-- 
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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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 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 ;)

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.

-- 
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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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.

why does libvirt-bin still stop before the libvirt-shutdown-guests job has 
finished the script?
do i have to modify the libvirt-bin job to wait for libvirt-shutdown-guests?
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?

here is my current version. upstart experts required urgently ;)

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

-- 
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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[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 integration:

-how can we ensure in upstart that the script got run on shutdown 
reboots but always before libvirt-bin and qemu-kvm got stopped?

-should we use return or exit in upstart scripts?

feedback highly welcome :)

BTW better output to screen and a log file wouldn't hurt

** Attachment added: libvirt-shutdown-guests.conf
   http://launchpadlibrarian.net/50807034/libvirt-shutdown-guests.conf

-- 
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.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs