On Fri, Dec 12, 2008 at 07:26:32PM +0100, Guido Günther wrote:
Make sure vms don't get killed when the libvirtd quits
unexpectedly.
Needs the previous patch since it looks at the pid file.
[...]
+ /* wait for qemu process to to show up */
+ if (ret == 0) {
+ int retries = 100;
+ while (retries) {
+ if ((ret = virFileReadPid(driver->stateDir, vm->def->name,
&vm->pid)) == 0)
+ break;
+ usleep(10*1000);
+ retries--;
+ }
+ if (ret)
+ qemudLog(QEMUD_WARN, _("Domain %s didn't show up\n"),
vm->def->name);
+ }
so we are waiting at most one second and waking up the process 100
times, I would suggest to relax that a bit, give it a bit more time like
10 seconds in case the system is trashing a bit 1 second may really be
too short. And maybe wake up a bit less ...
but patch looks good to me, it's just unfortunate we need to do some
tuning there.
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/