qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Plan for error handling in QMP


From: Eric Blake
Subject: Re: [Qemu-devel] Plan for error handling in QMP
Date: Thu, 26 Jul 2012 14:41:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 07/26/2012 12:22 PM, address@hidden wrote:
> 
> Hi,
> 
> We had a violent^Wheated discussion on IRC about how to move forward
> with Luiz's proposed error series.  I think we reached consensus.  This
> note attempts to outline that.
> 
> Principles
> ----------
> 1. Errors should be free formed strings with a class code
> 
> 2. There should be a small number of class codes (10-15) added
>    strictly when there are specific users of a code.
> 
> 3. The class code should be expressed as an enum data type in the normal
>    QMP schema.  Other than this, errors should have no structure in the
>    schema.[*]
> 
> 4. We should drop all dictionary arguments in the current error
>    mechanisms beyond 'class' and 'desc'.
> 
> 5. The following errors are used by libvirt:
>    - CommandNotFound: QMP parsing
>    - DeviceNotActive/KVMMissingCap: ballooning
>    - DeviceNotFound: drive_del
>    - MigrationExpected: cont

DeviceInUse, NotSupported: block-stream

Search for qemuMonitorJSONHasError in src/qemu/qemu_monitor_json.c

> 
> 6. We need to make sure that these errors are preserved while other
>    errors should be consolidated.
>    - We need to state very clear for 1.2 which errors are going away.
> 
> 7. We need to make sure that anything we expose in 1.2 stays that way.
>    If we're dropping 'InvalidParameterType' as a class code, it should be
>    dropped in 1.2.  This could be achieved by making all existing codes
>    except for those in (5) report 'UnknownError' or something.[*]
> 
> [*] I took a little bit of license with these.  Hopefully it's not
> controversial.
> 
> Regards,
> 
> Anthony Liguori
>    
> 
> 

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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