[libvirt] [PATCH] qemuDomainObjStart: Warn on corrupted image

Michal Privoznik mprivozn at redhat.com
Mon Nov 11 16:00:08 UTC 2013


On 11.11.2013 16:58, Peter Krempa wrote:
> On 11/11/13 16:48, Michal Privoznik wrote:
>> If the managedsave image is corrupted, e.g. the XML part is, we fail to
>> parse it and throw an error, e.g.:
>>
>> error: Failed to start domain jms8
>> error: XML error: missing security model when using multiple labels
>>
>> This is okay, as we can't really start the machine and avoid undefined
>> qemu behaviour. On the other hand, the error message doesn't give a
>> clue to users what should they do. The consensus here would be to thrown
> 
> Well a normal user won't check the logs as a first operation. This is a
> very good example place where libvirt would really benefit from having
> "stacked" error messages as the low level message doesn't give the user
> a clue about what happened.

Couldn't agree more. But that's slightly more of work to be done.

> 
>> a warning to logs saying "Hey, you've got a corrupted file".
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  src/qemu/qemu_driver.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> I'm NOT ACKing this right away as I personally don't like the change of
> behavior to report an error in case of a corrupt managed save. We will
> now require the users to manually delete the corrupted file instead.
> 
> Peter


I don't think we are changing the behavior. We are still throwing the
original error message. Just instead of not telling how to solve this,
we do now.

Michal




More information about the libvir-list mailing list