qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/19] monitor: Convert do_info_name() to QObjec


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 10/19] monitor: Convert do_info_name() to QObject
Date: Fri, 11 Dec 2009 10:54:03 -0200

On Thu, 10 Dec 2009 18:00:31 +0000
"Daniel P. Berrange" <address@hidden> wrote:

> On Thu, Dec 10, 2009 at 03:49:20PM -0200, Luiz Capitulino wrote:
> > On Thu, 10 Dec 2009 17:38:13 +0000
> > "Daniel P. Berrange" <address@hidden> wrote:
> > 
> > > On Thu, Dec 10, 2009 at 02:54:57PM -0200, Luiz Capitulino wrote:
> > 
> > > >  An option we have is: libvirt actually uses four or five of those
> > > > info commands. So, we could drop all the rest and guarantee that
> > > > only those libvirt ones are 100% correct.
> > > 
> > > Please don't do that.
> > 
> >  I won't.
> > 
> > > libvirt is adding support for new features all the
> > > time. I don't want to be in the situation where we can't add a new feature
> > > because it is missing in the JSON impl. If we're going to provide a 
> > > supported
> > > JSON monitor it needs to have all the commands converted, otherwise we'll
> > > have to stick with using the text based monitor.
> > 
> >  But 0.12 won't have all commands converted, this page has a listing
> > of what we're going to have:
> > 
> > http://www.linux-kvm.org/page/MonitorProtocol#Conversion_work_detailed_status
> > 
> >  'converted' and 'merged' are guaranteed, Markus did some work and enabled
> > one or two which are not there.
> > 
> >  I know that the usb and net ones are vital for you, I've patches enabling
> > them but their error handling is very difficult to get right.
> 
> The list of what libvirt uses is also outdated. In addition to those in
> yellow, we also now use, or will likely use in near future
> 
>   device_add
>   device_del
>   info pci
>   set_link
>   migrate_cancel
>   migrate_set_downtime
>   drive_add
>   info usb
> 
> So given the 0.12 release target, it sounds like we won't be able to
> use the JSON monitor :-(

 Well, given that we have only a few days before the final release it'll
be very hard to properly convert those.

 But there's something we could do if libvirt early adoption is a hard
requirement.

 You need two info handlers and some command handlers. The latter is
trivial to 'enable for usage' if it doesn't have user output, which is
the case for most command handlers.

 The problem though is error handling. Enabling a handler for QMP usage
w/o adding proper error handling support means that you won't be able
to get most error conditions. In the best case you'll get a generic error
message, in the worst QEMU won't even detect the error.

 This is doable, but doesn't sound like a good idea. Specially if today
libvirt is able to handle error conditions with the user protocol.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]