On Mon, Jan 16, 2017 at 1:10 AM, Daniel P. Berrange <berrange(a)redhat.com> wrote:
On Sat, Jan 14, 2017 at 10:31:05AM -0500, John Ferlan wrote:
> [...]
>
> >> diff --git
a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
> >> new file mode 100644
> >> index 0000000..f6e3e37
> >> --- /dev/null
> >> +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args
> >> @@ -0,0 +1,24 @@
> >> +LC_ALL=C \
> >> +PATH=/bin \
> >> +HOME=/home/test \
> >> +USER=test \
> >> +LOGNAME=test \
> >> +QEMU_AUDIO_DRV=none \
> >> +/usr/libexec/qemu-kvm \
> >> +-name QEMUGuest1 \
> >> +-S \
> >> +-M pc \
> >> +-cpu qemu32 \
> >> +-m 214 \
> >> +-smp 1,sockets=1,cores=1,threads=1 \
> >> +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
> >> +-nographic \
> >> +-nodefaults \
> >> +-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
> >> +-no-acpi \
> >> +-boot c \
> >> +-usb \
> >> +-drive file=vxhs://192.168.0.1:9999/eb90327c-8302-4725-9e1b-4e85ed4dc251,\
> >> +format=raw,if=none,id=drive-virtio-disk0,cache=none \
> >
> > Please use the modern syntax for disk specification, not the
> > legacy URI syntax ie
> >
> > -drive driver=vxhs,vdisk-id=eb90327c-8302-4725-4e85ed4dc251,\
> > server.host=example.com,server.port=12345,format=raw,
> > if=none,id=driver-virtio-disk0,cache=0
> >
>
> FWIW: qemuBuildDriveStr doesn't support that yet for any driver -
> although it probably should be updated... Timing wise whether that work
> could get done before this work is ready - I'm not sure. While I agree
> the code "should" use the new syntax - I do think we'd have to make
> adjustments to all drive strings. That would probably mean knowing
> whether the new syntax was "in place" before the current libvirt qemu
> minimum version...
The pre-existing drivers in libvirt need to support both new & old syntax,
in order that we have compat with older QEMU versions. As a brand new driver,
IMHO, VXHS must support the new syntax exclusively - there's no reason to
use the old syntax. We don't need to convert all existing drivers to the
new syntax at the same time, but the VHXS patch can start the trend.
Sometime back, during the qemu patch discussion, we had agreed to have
support for both URI syntax and also the QAPI syntax within qemu. It
was also decided to limit the URI syntax to supporting only one host
server, and use the QAPI exclusively for more than one servers.
Now that the failover code has moved from qemu to libqnio, vxhs will
accept only one server. Failover will be handled entirely within
libqnio. Given that gluster is the only network protocol that supports
the new syntax, and that too only for the case when more than one
servers are specified, would it be acceptable if vxhs goes with the
URI syntax for now? We could add support for the new syntax to vxhs
later when doing it for the other protocols!
Thanks!