From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej4su-0002JO-Cp for qemu-devel@nongnu.org; Tue, 06 Feb 2018 10:10:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ej4sp-0001QZ-Jf for qemu-devel@nongnu.org; Tue, 06 Feb 2018 10:10:12 -0500 References: <20180206105204.14817-1-berrange@redhat.com> From: Eric Blake Message-ID: Date: Tue, 6 Feb 2018 09:09:40 -0600 MIME-Version: 1.0 In-Reply-To: <20180206105204.14817-1-berrange@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] block: include original filename when reporting invalid URIs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , qemu-block@nongnu.org, Max Reitz On 02/06/2018 04:52 AM, Daniel P. Berrang=C3=A9 wrote: > Consider passing a JSON based block driver to "qemu-img commit" >=20 > $ qemu-img commit 'json:{"driver":"qcow2","file":{"driver":"gluster",\ > "volume":"gv0","path":"sn1.qcow2", > "server":[{"type":\ > "tcp","host":"10.73.199.197","port":"24007"}]},}' >=20 > Currently it will commit the content and then report an incredibly > useless error message when trying to re-open the committed image: >=20 > qemu-img: invalid URI > Usage: file=3Dgluster[+transport]://[host[:port]]volume/path[?socket= =3D...][,file.debug=3DN][,file.logfile=3D/path/filename.log] >=20 > With this fix we get: >=20 > qemu-img: invalid URI json:{"server.0.host": "10.73.199.197", > "driver": "gluster", "path": "luks.qcow2", "server.0.type": > "tcp", "server.0.port": "24007", "volume": "gv0"} >=20 > Of course the root cause problem still exists, but now we know > what actually needs fixing. >=20 > Signed-off-by: Daniel P. Berrang=C3=A9 > --- > block/gluster.c | 2 +- > block/sheepdog.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org