[libvirt] [PATCH] util: storagefile: Properly set transport type when parsing NBD strings
Eric Blake
eblake at redhat.com
Thu Jan 16 12:27:04 UTC 2020
On 1/16/20 5:41 AM, Peter Krempa wrote:
> When parsing legacy NBD backing file strings such as
> 'nbd:unix:/tmp/sock:exportname=/' we'd fail to set the transport to
> VIR_STORAGE_NET_HOST_TRANS_UNIX. This started to be a problem once we
> actually started to generate config of the backing store on the command
> line with -blockdev as the JSON code would try to format it as TCP and
> fail with:
>
> internal error: argument key 'host' must not have null value
>
> Set the type properly and add a test.
>
> This bug was found by the libguestfs test suite in:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1791614
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> src/util/virstoragefile.c | 2 +-
> tests/virstoragetest.c | 4 ++++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake <eblake at redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the libvir-list
mailing list