qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal ch


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks
Date: Thu, 29 Jun 2017 14:04:19 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/14/2017 08:51 AM, Halil Pasic wrote:

[apologies for the delayed response, and also adding Markus]


>>
>> One reason I choose error_report_err is to be consistent about hint
>> reporting (the other one is that was what Connie suggested). I do
>> not understand why do we omit hints if QMP, but I figured that's
>> our policy. So the hint I'm adding must not be printed in QMP
>> context -- because that's our policy. I was pretty sure what I
>> want to do is add a hint (and not make a very long 'core' error
>> message).
>>
>> Can you (or somebody else)  explain why are hints dropped in QMP
>> context?
>>
>> Don't misunderstand I'm open towards your proposal, it's just
>> that:
>> 1) I would like to understand.
>> 2) I would like to get the very same result as produced by
>> https://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg01472.html 
>>
>> Regards,
>> Halil
>>
>>
> 
> ping.
> 
> I would like to do a v2, but I want this sorted out first.
> 
> 'This' basically boils down to the question and
> 'Why aren't hints reported in QMP context?'

QMP is supposed to be machine-parseable.  Hints are supposed to be
human-readable. If you have a machine managing the monitor, the hint
adds nothing but bandwidth consumption, because machine should not be
parsing the human portion of the error message in the first place (as it
is, libvirt already just logs the human-readable portion of a message,
and bases its actions solely on the machine-stable portions of an error
reply: namely, whether an error was sent at all, and occasionally, what
error class was used for that error - there's no guarantee a human will
be reading the log, though).

There's also the question of whether the hints are even useful (telling
the user to do something differently doesn't help if it wasn't the user,
but libvirt, that was doing things wrong to cause the error in the first
place).

So while those points may or may not be the original rationale for why
hints are not used in QMP, but it is an explanation that works for me
now.  Markus may also have an opinion on the matter.

> and 'Why is this
> case special (a hint should be reported
> even in QMP context?'

If something absolutely must be reported, then it is not a hint, and
shouldn't be using the hint mechanism.

> 
> Regarding the first question hints being reported via
> error_printf_unless_qmp seems to come from commit
> 50b7b000c9 ("hmp: Allow for error message hints on HMP")
> --> Cc-ing Eric maybe he can help.
> 
> Regards,
> Halil
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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