Re: [PATCH] Drive hot-unplug: reliable parsing of HMP results

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

 



On Mon, Aug 10, 2015 at 05:37:30PM +0200, Frank Schreuder wrote:
> Hot-unplugging a disk from a guest that supports hot-unplugging generates an error
> in the libvirt log when running QEMU with the "-msg timestamp=on" flag.
> 
> 2015-08-06 10:48:59.945+0000: 11662: error : qemuMonitorTextDriveDel:2594 :
> operation failed: deleting drive-virtio-disk4 drive failed:
> 2015-08-06T10:48:59.945058Z Device 'drive-virtio-disk4' not found
> 
> This error is caused because the HMP results are getting prefixed with a timestamp.
> Parsing the output is not reliable with STRPREFIX as the results can be prefixed with a timestamp.
> 
> Using strstr ensures that parsing the output works whether the results are prefixed or not.
> 
> Cc: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
> Cc: Daniel P. Berrange <berrange@xxxxxxxxxx>
> Signed-off-by: Frank Schreuder <fschreuder@xxxxxxxxxx>
> ---
> 
>  src/qemu/qemu_monitor_text.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>

Attachment: pgp9rS8aYF0mE.pgp
Description: PGP signature

--
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]