Re: [PATCH] qemu: hotplug: unify "not found" logs when detaching device

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

 




At 2017-12-16 09:26:32, "John Ferlan" <jferlan@xxxxxxxxxx> wrote:
>
>
>On 12/14/2017 06:16 AM, Chen Hanxiao wrote:
>> From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
>> 
>> Some services, such as Nova, check whether device was not found
>> by errror messages "not found". [1]
>
>error
>
>> 
>> This patch unify logs of qemuDomainDetachDeviceLive, which will be helpful.
>> 
>> [1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/guest.py#L406
>> 
>> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
>> ---
>>  src/qemu/qemu_hotplug.c | 18 +++++++++++-------
>>  1 file changed, 11 insertions(+), 7 deletions(-)
>> 
>
>Something about a tool that parses the error message(s) looking for a
>specific message string in English and needing to alter libvirt sources
>to match that tools' needs strikes me as incorrect and a "slippery
>slope" to follow.
>
>I'm not in favor of this because we'll be constantly chasing these types
>of bugs to match some other tools' (what I think is) incorrect means to
>handle errors.
>

Agree.
But we don't have enough error code to cover all of scenario.

For qemuDomainDetachDeviceDiskLive, VIR_ERR_OPERATION_FAILED can be
"disk not found", also can be "cannot hot unplug multifunction PCI device"
in the following call of qemuDomainDetachVirtioDiskDevice.

So the tools powered by libvirt had to find a workaround by 
analyzing error messages...

Regards,
- Chen

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux