Hi,
* Hrvoje Ribicic <
ri...@google.com> [2014-01-22 11:47:03 +0100]:
Sorry for the delay. We were doing some digging in the QEMU source in
order to find out why this is happening. Yes, we were already planning to
report this misbehavior on qemu-devel today, so we will have news soon.
> But after this is very likely registered as a bug, a patch would be
> welcome. If this happens early enough, even stable-2.8 could be a good
> target for the patch - I'll try and reproduce the bug there.
>
>
Primarilly I thought 2.9 (and not 2.8) because this is the debian wheezy
version where qemu 1.7 is available too.
I was wondering if a quick and dirty workaround is the better
way to go. I mean the interaction with qmp inside GetInstanceInfo() is
kinda "optional" because cpu/memory values are also statically
available. So if we catch this TypeError there (and add some long
comment) it wouldn't make so much difference. But there is also the
QmpConnection() related to spice password..
A proper fix with the current code is more difficult since we have to
parse unknown number of greeting messages upon qmp connect() until we
receive a socket.timeout, meaning that there is no other data available
(since socket is blocking). I think the cost will be unacceptable!
What we could do is flush the entire buffer after parsing the first greeting
message to flush. And then execute "qmp_capabilities".
> >
> > PS: All this have been tested with QEMU 1.7
> >
As Apollon said this is NOT reproducable with QEMU 1.1. Which means this
is certainly a bug introduced in later versions. Let's hope it gets
fixed upstream soon enough.. Since the code inside QEMU is shared, this
misbehavior can be observed with QEMU monitor as well (but has no real
effect on Ganeti, since we do not parse any greeting messages there).
>
> Thanks for the detailed analysis!
>
:) So what do you think?
Cheers,
dimara
PS: Note that in 2.10, along with the hotplug implementation, QMP related code
has been refactored since MonitorSocket class has been introduced. So
this will need a bit of effort on your side to forward port it.