Re: qemu: Add timeout for monitor to avoid virsh getting stuck when monitor gets die.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ä 2011å04æ07æ 18:17, Jiri Denemark åé:
On Thu, Apr 07, 2011 at 18:04:19 +0800, Osier Yang wrote:
ä 2011å04æ06æ 16:51, Jiri Denemark åé:
This is not the right approach. Introducing a timeout into all monitor command
send to qemu is a bad thing. I think the right approach is to have a simple
API which would just return domain's state without talking to its monitor or
doing other complicated stuff. The new API could then be used by virsh list to
list all domains even though they are blocked on qemu monitor. After all,
virsh is not really interested in current memory consumption of domains when
listing them.


IMHO this won't work, if you restart libvirtd after the monitor gets
dead, you even can't get connection to libvirtd anymore, see:

http://www.redhat.com/archives/libvir-list/2011-March/msg01422.html

How to reproduce:
1. setup a virt guest with qemu-kvm, and start it
2. stop qemu process with following:
     # kill -STOP  `ps aux | grep qemu | grep -v grep | awk '{print $2}'`
3. run the following command:
4. # service libvirtd restart
5. # virsh (hangs here)

Yes, but that's a separate issue, IMHO. virsh hangs at this point since
libvirtd doesn't even get to the point when it is able to accept connections
from client. So introducing a timeout to some specific operations to help
solve this issue might be the right approach but doing all commands with
timeout is certainly not what we should do. Daniel described all the issues
very nicely in his detailed email.

Oh, I didn't mean your proposal won't work for "virsh list", that will
work well I guess. :)

I meant if we consider "virsh list can't work if the monitor dies" as
a problem, then we need to solve the even more bad problem ---
libvirtd can't accept connection anymore if it's restarted.

Regards
Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]