qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] Block patches
@ 2018-03-13 12:29 Jeff Cody
  2018-03-13 12:29 ` [Qemu-devel] [PULL 1/1] block: include original filename when reporting invalid URIs Jeff Cody
  2018-03-15 10:00 ` [Qemu-devel] [PULL 0/1] Block patches Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Cody @ 2018-03-13 12:29 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel

The following changes since commit 834eddf22ec762839b724538c7be1d1d3b2d9d3b:

  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-03-13 10:49:02 +0000)

are available in the git repository at:

  git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to 44acd46f60ce6f16d369cd443e77949deca56a2c:

  block: include original filename when reporting invalid URIs (2018-03-13 08:06:55 -0400)

----------------------------------------------------------------
Block patch
----------------------------------------------------------------

Daniel P. Berrangé (1):
  block: include original filename when reporting invalid URIs

 block/gluster.c  | 2 +-
 block/sheepdog.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] block: include original filename when reporting invalid URIs
  2018-03-13 12:29 [Qemu-devel] [PULL 0/1] Block patches Jeff Cody
@ 2018-03-13 12:29 ` Jeff Cody
  2018-03-15 10:00 ` [Qemu-devel] [PULL 0/1] Block patches Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Cody @ 2018-03-13 12:29 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel, Daniel P. Berrangé

From: Daniel P. Berrangé <berrange@redhat.com>

Consider passing a JSON based block driver to "qemu-img commit"

$ qemu-img commit 'json:{"driver":"qcow2","file":{"driver":"gluster",\
                  "volume":"gv0","path":"sn1.qcow2",
                  "server":[{"type":\
		  "tcp","host":"10.73.199.197","port":"24007"}]},}'

Currently it will commit the content and then report an incredibly
useless error message when trying to re-open the committed image:

  qemu-img: invalid URI
  Usage: file=gluster[+transport]://[host[:port]]volume/path[?socket=...][,file.debug=N][,file.logfile=/path/filename.log]

With this fix we get:

  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"}

Of course the root cause problem still exists, but now we know
what actually needs fixing.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180206105204.14817-1-berrange@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block/gluster.c  | 2 +-
 block/sheepdog.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/gluster.c b/block/gluster.c
index 63d3c37d4c..296e036b3d 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -665,7 +665,7 @@ static int qemu_gluster_parse(BlockdevOptionsGluster *gconf,
     if (filename) {
         ret = qemu_gluster_parse_uri(gconf, filename);
         if (ret < 0) {
-            error_setg(errp, "invalid URI");
+            error_setg(errp, "invalid URI %s", filename);
             error_append_hint(errp, "Usage: file=gluster[+transport]://"
                                     "[host[:port]]volume/path[?socket=...]"
                                     "[,file.debug=N]"
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 8680b2926f..797ea5953b 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1036,7 +1036,7 @@ static void sd_parse_uri(SheepdogConfig *cfg, const char *filename,
 
     cfg->uri = uri = uri_parse(filename);
     if (!uri) {
-        error_setg(&err, "invalid URI");
+        error_setg(&err, "invalid URI '%s'", filename);
         goto out;
     }
 
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] Block patches
  2018-03-13 12:29 [Qemu-devel] [PULL 0/1] Block patches Jeff Cody
  2018-03-13 12:29 ` [Qemu-devel] [PULL 1/1] block: include original filename when reporting invalid URIs Jeff Cody
@ 2018-03-15 10:00 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2018-03-15 10:00 UTC (permalink / raw)
  To: Jeff Cody; +Cc: Qemu-block, QEMU Developers

On 13 March 2018 at 12:29, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit 834eddf22ec762839b724538c7be1d1d3b2d9d3b:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-03-13 10:49:02 +0000)
>
> are available in the git repository at:
>
>   git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 44acd46f60ce6f16d369cd443e77949deca56a2c:
>
>   block: include original filename when reporting invalid URIs (2018-03-13 08:06:55 -0400)
>
> ----------------------------------------------------------------
> Block patch
> ----------------------------------------------------------------
>
> Daniel P. Berrangé (1):
>   block: include original filename when reporting invalid URIs
>
>  block/gluster.c  | 2 +-
>  block/sheepdog.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-15 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 12:29 [Qemu-devel] [PULL 0/1] Block patches Jeff Cody
2018-03-13 12:29 ` [Qemu-devel] [PULL 1/1] block: include original filename when reporting invalid URIs Jeff Cody
2018-03-15 10:00 ` [Qemu-devel] [PULL 0/1] Block patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).