[Qemu-devel] [RFC v2 for-2.9 00/10] Fixes and cleanups around SocketAddress

Markus Armbruster posted 10 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1490879707-6060-1-git-send-email-armbru@redhat.com
Test s390x passed
There is a newer version of this series
block.c                | 41 ++++++++++++++++++++++--
block/file-posix.c     |  6 ++++
block/gluster.c        | 28 +++++++++++------
block/nbd.c            | 62 ++++++++++++++++++++++---------------
block/nfs.c            |  7 +++++
block/rbd.c            |  6 ++++
block/sheepdog.c       | 84 +++++++++++++++++++++++++++++++++-----------------
block/ssh.c            |  8 +++++
blockdev-nbd.c         |  1 +
chardev/char-socket.c  |  9 ++++--
include/qemu/sockets.h | 11 +++++++
io/dns-resolver.c      |  7 +++--
qapi-schema.json       | 19 +++++-------
qapi/block-core.json   |  6 ++--
ui/vnc.c               | 19 ++++++++----
util/qemu-sockets.c    | 37 ++++++++++++++++++++--
16 files changed, 258 insertions(+), 93 deletions(-)
[Qemu-devel] [RFC v2 for-2.9 00/10] Fixes and cleanups around SocketAddress
Posted by Markus Armbruster 7 years ago
What makes this 2.9 material is the crash bug fixed in PATCH 2 and the
QAPI/QMP interface cleanups in PATCH 7+8.

This is RFC because:

1. To give you one more chance to ask for undocumented -drive
   driver=nbd usage compatibility [PATCH 08+09].

2. Another round of sheepdog tests is still in progress (with
   Kashyap's help).

Max, please have a close look at PATCH 11, I hope this is what you
meant when you asked for "parsing @server".

v2:
* PATCH 01+02+04+05 unchanged.
* PATCH 03 error message improved, blank line [Max]
* PATCH 06 commit message typo [Max]
* PATCH 07 new, factored out of old PATCH 7
* PATCH 08-10 updated, please re-review

Markus Armbruster (10):
  nbd sockets vnc: Mark problematic address family tests TODO
  char: Fix socket with "type": "vsock" address
  io vnc sockets: Clean up SocketAddressKind switches
  block: Document -drive problematic code and bugs
  gluster: Prepare for SocketAddressFlat extension
  qapi-schema: SocketAddressFlat variants 'vsock' and 'fd'
  sockets: New helper socket_address_crumple()
  nbd: Tidy up blockdev-add interface
  squash! nbd: Tidy up blockdev-add interface
  sheepdog: Fix blockdev-add

 block.c                | 41 ++++++++++++++++++++++--
 block/file-posix.c     |  6 ++++
 block/gluster.c        | 28 +++++++++++------
 block/nbd.c            | 62 ++++++++++++++++++++++---------------
 block/nfs.c            |  7 +++++
 block/rbd.c            |  6 ++++
 block/sheepdog.c       | 84 +++++++++++++++++++++++++++++++++-----------------
 block/ssh.c            |  8 +++++
 blockdev-nbd.c         |  1 +
 chardev/char-socket.c  |  9 ++++--
 include/qemu/sockets.h | 11 +++++++
 io/dns-resolver.c      |  7 +++--
 qapi-schema.json       | 19 +++++-------
 qapi/block-core.json   |  6 ++--
 ui/vnc.c               | 19 ++++++++----
 util/qemu-sockets.c    | 37 ++++++++++++++++++++--
 16 files changed, 258 insertions(+), 93 deletions(-)

-- 
2.7.4


Re: [Qemu-devel] [Qemu-block] [RFC v2 for-2.9 00/10] Fixes and cleanups around SocketAddress
Posted by Kashyap Chamarthy 7 years ago
On Thu, Mar 30, 2017 at 03:14:57PM +0200, Markus Armbruster wrote:
> What makes this 2.9 material is the crash bug fixed in PATCH 2 and the
> QAPI/QMP interface cleanups in PATCH 7+8.
> 
> This is RFC because:
> 
> 1. To give you one more chance to ask for undocumented -drive
>    driver=nbd usage compatibility [PATCH 08+09].
> 
> 2. Another round of sheepdog tests is still in progress (with
>    Kashyap's help).
> 
> Max, please have a close look at PATCH 11, I hope this is what you
> meant when you asked for "parsing @server".
> 
> v2:
> * PATCH 01+02+04+05 unchanged.
> * PATCH 03 error message improved, blank line [Max]
> * PATCH 06 commit message typo [Max]
> * PATCH 07 new, factored out of old PATCH 7
> * PATCH 08-10 updated, please re-review
> 
> Markus Armbruster (10):
>   nbd sockets vnc: Mark problematic address family tests TODO
>   char: Fix socket with "type": "vsock" address
>   io vnc sockets: Clean up SocketAddressKind switches
>   block: Document -drive problematic code and bugs
>   gluster: Prepare for SocketAddressFlat extension
>   qapi-schema: SocketAddressFlat variants 'vsock' and 'fd'
>   sockets: New helper socket_address_crumple()
>   nbd: Tidy up blockdev-add interface
>   squash! nbd: Tidy up blockdev-add interface
>   sheepdog: Fix blockdev-add

FWIW:

Tested-by: Kashyap Chamarthy <kchamart@redhat.com>

Details:

Env
~~~

I prepared a two-node Sheepdog cluster with Corosync.  Setup info:

	https://kashyapc.fedorapeople.org/virt/sheepdog-qemu-corosync.txt

And used Markus' branch 'blockdev-fixes-debug':

    http://repo.or.cz/qemu/armbru.git/tree/refs/heads/blockdev-fixes-dbg

    $ git describe
    pull-misc-2017-03-28-27-g885750d
    
    $ ./qemu-system-x86_64 -version
    QEMU emulator version 2.8.92 (v2.9.0-rc1-110-g885750d)
    Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Tests
~~~~~

There are four of them (thanks Markus):

[OK] Test-1: Syntax: sheepdog:hostname:port:Alice
[OK] Test-2: Syntax: sheepdog://hostname:port/Alice
[OK] Test-3: Syntax: -drive if=none,driver=sheepdog,server.type=inet,server.host=hostname,server.port=port,vdi=Alice
[OK] Test-4: Syntax: -blockdev node-name=nn,driver=sheepdog,server.type=inet,server.host=host,server.port=port,vdi=Alice

Complete test invocation 
~~~~~~~~~~~~~~~~~~~~~~~~

Test-1: Syntax: sheepdog:hostname:port:Alice
-----------------------------------------------------------------------
$ ./qemu-system-x86_64 -display none -nodefconfig -nodefaults sheepdog:192.168.122.84:7000:Alice
@@@ server.host=192.168.122.84
@@@ server.port=7000
@@@ tag=
@@@ server.type=inet
@@@ vdi=Alice
### vdi=Alice addr=192.168.122.84:7000 snap-id=(null) tag=
WARNING: Image format was not specified for 'json:{"server.host": "192.168.122.84", "server.port": "7000", "tag": "", "driver": "sheepdog", "server.type": "inet", "vdi": "Alice"}' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
-----------------------------------------------------------------------

Test-2: Syntax: sheepdog://hostname:port/Alice
-----------------------------------------------------------------------
$ ./qemu-system-x86_64 -display none -nodefconfig -nodefaults sheepdog://192.168.122.84:7000/Alice
@@@ server.host=192.168.122.84
@@@ server.port=7000
@@@ tag=
@@@ server.type=inet
@@@ vdi=Alice
### vdi=Alice addr=192.168.122.84:7000 snap-id=(null) tag=
WARNING: Image format was not specified for 'json:{"server.host": "192.168.122.84", "server.port": "7000", "tag": "", "driver": "sheepdog", "server.type": "inet", "vdi": "Alice"}' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
-----------------------------------------------------------------------

Test-3: Syntax: -drive \
if=none,driver=sheepdog,server.type=inet,server.host=hostname,server.port=port,vdi=Alice
-----------------------------------------------------------------------
$ ./qemu-system-x86_64 -display none -nodefconfig -nodefaults -drive if=none,driver=sheepdog,server.type=inet,server.host=192.168.122.84,server.port=7000,vdi=Alice
@@@ server.host=192.168.122.84
@@@ server.port=7000
@@@ server.type=inet
@@@ vdi=Alice
### vdi=Alice addr=192.168.122.84:7000 snap-id=(null) tag=
-----------------------------------------------------------------------

Test-4: Syntax: -blockdev \
node-name=nn,driver=sheepdog,server.type=inet,server.host=host,server.port=port,vdi=Alice
-----------------------------------------------------------------------
$ ./qemu-system-x86_64 -display none -nodefconfig -nodefaults -blockdev node-name=nn,driver=sheepdog,server.type=inet,server.host=192.168.122.84,server.port=7000,vdi=Alice
@@@ server.port=7000
@@@ server.host=192.168.122.84
@@@ server.type=inet
@@@ vdi=Alice
### vdi=Alice addr=192.168.122.84:7000 snap-id=(null) tag=
-----------------------------------------------------------------------


-- 
/kashyap