Re: [Qemu-devel] [RFC] Fixing the error failure

2012-07-02 Thread Luiz Capitulino
On Mon, 02 Jul 2012 07:47:56 -0500 Anthony Liguori wrote: > > So far, there haven't been any calls for a change of the wire protocol. > > Changing all existing errors and repurposing 'desc' is effectively changing > the > wire protocol. We're not going to change existing errors and I disagree

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-07-02 Thread Anthony Liguori
On 06/28/2012 02:50 AM, Markus Armbruster wrote: Anthony Liguori writes: On 06/26/2012 06:21 AM, Markus Armbruster wrote: "Daniel P. Berrange" writes: On Tue, Jun 26, 2012 at 09:54:21AM +0200, Markus Armbruster wrote: Luiz Capitulino writes: On Thu, 21 Jun 2012 13:42:19 +0100 "Daniel

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-07-02 Thread Paolo Bonzini
Il 20/06/2012 19:48, Luiz Capitulino ha scritto: > However, we'd change how we use 'desc' and our error classes. 'desc' would > become a string which is filled by a printf-like function (see section 2) and > we'd replace all error classes we have today by the following ones: > > o ParameterError

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-28 Thread Markus Armbruster
Anthony Liguori writes: > On 06/26/2012 06:21 AM, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >>> On Tue, Jun 26, 2012 at 09:54:21AM +0200, Markus Armbruster wrote: Luiz Capitulino writes: > On Thu, 21 Jun 2012 13:42:19 +0100 > "Daniel P. Berrange" wrote: >> [

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-26 Thread Anthony Liguori
On 06/26/2012 06:21 AM, Markus Armbruster wrote: "Daniel P. Berrange" writes: On Tue, Jun 26, 2012 at 09:54:21AM +0200, Markus Armbruster wrote: Luiz Capitulino writes: On Thu, 21 Jun 2012 13:42:19 +0100 "Daniel P. Berrange" wrote: [...] In libvirt we have always reserved the right to c

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-26 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Jun 26, 2012 at 09:54:21AM +0200, Markus Armbruster wrote: >> Luiz Capitulino writes: >> >> > On Thu, 21 Jun 2012 13:42:19 +0100 >> > "Daniel P. Berrange" wrote: [...] >> >> In libvirt we have always reserved the right to change the error >> >> code repor

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-26 Thread Daniel P. Berrange
On Tue, Jun 26, 2012 at 09:54:21AM +0200, Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 21 Jun 2012 13:42:19 +0100 > > "Daniel P. Berrange" wrote: > > > > [...] > > > >> > However, we'd change how we use 'desc' and our error classes. 'desc' > >> > would > >> > become a string

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-26 Thread Markus Armbruster
Anthony Liguori writes: > Um, why not just do: > > #define GENERIC_ERROR "{'class': 'GenericError', 'data': { 'domain': %s, > 'msg': %s}" > > And then just use: > > error_set(errp, GENERIC_ERROR, SOME_DOMAIN, "This operation failed!"); Please explain the intended use of domain, and why it is ne

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-26 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 21 Jun 2012 13:42:19 +0100 > "Daniel P. Berrange" wrote: > > [...] > >> > However, we'd change how we use 'desc' and our error classes. 'desc' would >> > become a string which is filled by a printf-like function (see section 2) >> > and >> >> Good, using a pri

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-25 Thread Luiz Capitulino
On Thu, 21 Jun 2012 13:42:19 +0100 "Daniel P. Berrange" wrote: [...] > > However, we'd change how we use 'desc' and our error classes. 'desc' would > > become a string which is filled by a printf-like function (see section 2) > > and > > Good, using a printf-like string for desc is the big cha

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-21 Thread Daniel P. Berrange
On Wed, Jun 20, 2012 at 02:48:38PM -0300, Luiz Capitulino wrote: > Yet another thread fork. > > After talking with Daniel and Markus about QMP errors (which is not just about > QMP, as this affects QEMU as whole), I've put together the proposal below. > > I'll discuss three points. First, the err

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-20 Thread Luiz Capitulino
On Wed, 20 Jun 2012 14:47:14 -0500 Anthony Liguori wrote: > > I'm not sure this is better because it suggests that all classes we have > > today > > are still valid. > > Yes, they are still valid. We cannot and should not change any of the error > behavior we have today. We can keep them and

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-20 Thread Anthony Liguori
On 06/20/2012 02:40 PM, Luiz Capitulino wrote: On Wed, 20 Jun 2012 13:46:08 -0500 Anthony Liguori wrote: On 06/20/2012 12:48 PM, Luiz Capitulino wrote: Yet another thread fork. After talking with Daniel and Markus about QMP errors (which is not just about QMP, as this affects QEMU as whole),

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-20 Thread Luiz Capitulino
On Wed, 20 Jun 2012 13:46:08 -0500 Anthony Liguori wrote: > On 06/20/2012 12:48 PM, Luiz Capitulino wrote: > > Yet another thread fork. > > > > After talking with Daniel and Markus about QMP errors (which is not just > > about > > QMP, as this affects QEMU as whole), I've put together the propos

Re: [Qemu-devel] [RFC] Fixing the error failure

2012-06-20 Thread Anthony Liguori
On 06/20/2012 12:48 PM, Luiz Capitulino wrote: Yet another thread fork. After talking with Daniel and Markus about QMP errors (which is not just about QMP, as this affects QEMU as whole), I've put together the proposal below. I'll discuss three points. First, the error format and classes. Secon

[Qemu-devel] [RFC] Fixing the error failure

2012-06-20 Thread Luiz Capitulino
Yet another thread fork. After talking with Daniel and Markus about QMP errors (which is not just about QMP, as this affects QEMU as whole), I've put together the proposal below. I'll discuss three points. First, the error format and classes. Second, the internal API and third compatibility. Don