[Qemu-devel] [PATCH v3 0/8] Support multiple listening sockets per VNC server

Daniel P. Berrange posted 8 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170203120649.15637-1-berrange@redhat.com
Test checkpatch passed
Test docker passed
Test s390x failed
include/qemu/option.h |   9 +
qapi-schema.json      |  28 ++-
qemu-options.hx       |  12 +-
ui/vnc.c              | 655 +++++++++++++++++++++++++++++++++++---------------
ui/vnc.h              |  10 +-
util/qemu-option.c    |  19 ++
6 files changed, 531 insertions(+), 202 deletions(-)
[Qemu-devel] [PATCH v3 0/8] Support multiple listening sockets per VNC server
Posted by Daniel P. Berrange 7 years, 1 month ago
Followup to

 v2: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg04951.html

There are two core feature changes in this series

 - If a DNS name resolves to multiple distinct IP addresses,
   the VNC server is now able to listen on all of them

 - The -vnc argument syntax is extended to allow the 'vnc'
   and 'websocket' arguments to be listed multiple times.
   This allows a single VNC server to listen on multiple
   different names / addresses.

The io/ patch series that this previously depended on is now merged
in git master.

Changed in v3:

 - Resolve conflicts with master for qapi schema
 - Remove left-over debug statement (Eric)

Changed in v2:

 - Fix qapi version annotation (Eric)
 - Fix misc typos in docs/commit message (Eric)
 - Replace qemu_opt_get_all() with generic QemuOpt iterator API
   to avoid needless mem allocations


Daniel P. Berrange (8):
  ui: fix regression handling bare 'websocket' option to -vnc
  ui: fix reporting of VNC auth in query-vnc-servers
  ui: refactor VncDisplay to allow multiple listening sockets
  ui: refactor code for populating SocketAddress from vnc_display_open
  ui: extract code to connect/listen from vnc_display_open
  ui: let VNC server listen on all resolved IP addresses
  util: add iterators for QemuOpts values
  ui: add ability to specify multiple VNC listen addresses

 include/qemu/option.h |   9 +
 qapi-schema.json      |  28 ++-
 qemu-options.hx       |  12 +-
 ui/vnc.c              | 655 +++++++++++++++++++++++++++++++++++---------------
 ui/vnc.h              |  10 +-
 util/qemu-option.c    |  19 ++
 6 files changed, 531 insertions(+), 202 deletions(-)

-- 
2.9.3


Re: [Qemu-devel] [PATCH v3 0/8] Support multiple listening sockets per VNC server
Posted by Michael Tokarev 7 years, 1 month ago
03.02.2017 15:06, Daniel P. Berrange wrote:

>  - If a DNS name resolves to multiple distinct IP addresses,
>    the VNC server is now able to listen on all of them
> 
>  - The -vnc argument syntax is extended to allow the 'vnc'
>    and 'websocket' arguments to be listed multiple times.
>    This allows a single VNC server to listen on multiple
>    different names / addresses.

Why it's needed? To me it looks like to much for a very rarely
useful thing, no? (Just thinking out loud, nothing more)

/mjt

Re: [Qemu-devel] [PATCH v3 0/8] Support multiple listening sockets per VNC server
Posted by Daniel P. Berrange 7 years, 1 month ago
On Fri, Feb 03, 2017 at 04:29:43PM +0300, Michael Tokarev wrote:
> 03.02.2017 15:06, Daniel P. Berrange wrote:
> 
> >  - If a DNS name resolves to multiple distinct IP addresses,
> >    the VNC server is now able to listen on all of them
> > 
> >  - The -vnc argument syntax is extended to allow the 'vnc'
> >    and 'websocket' arguments to be listed multiple times.
> >    This allows a single VNC server to listen on multiple
> >    different names / addresses.
> 
> Why it's needed? To me it looks like to much for a very rarely
> useful thing, no? (Just thinking out loud, nothing more)

It is very common to have virtualization hosts with multiple network
interfaces and multiple address protocols. Wanting to restrict VNC
to listen on a subset of interfaces/addresses is pretty reasonable

eg, consider a host with

  eth0:  10.0.0.1
         2001:beef:1

  eth1:  192.168.0.1
         feed:beef:1

And you want VNC to only listen on the IP addresses associated with
the public interface eth1. With current QEMU this is impossible.

Even if you setup DNS e.g.

  internal.example.com A    10.0.0.1
                       AAAA 2001:beef:1

  public.example.com   A    192.168.0.1
                       AAAA feed:beef:1

and pass hostname public.example.com to QEMU -vnc, it'll only listen on
one of the two addresses the hostname resolves to. This series addresses
that flaw by making us open multiple listener sockets for all addresses
that are resolved.

Even with that flaw fixed, it is still unreasonable limited. There may
be multiple hostnames you wish VNC to listen on, or you may not have DNS
entries for the particular addresses you want VNC to listen on. Thus there
is need to allow for multiple addresses to be given to -vnc.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

Re: [Qemu-devel] [PATCH v3 0/8] Support multiple listening sockets per VNC server
Posted by Gerd Hoffmann 7 years, 1 month ago
On Fr, 2017-02-03 at 12:06 +0000, Daniel P. Berrange wrote:
> Followup to
> 
>  v2:
> https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg04951.html
> 
> There are two core feature changes in this series
> 
>  - If a DNS name resolves to multiple distinct IP addresses,
>    the VNC server is now able to listen on all of them
> 
>  - The -vnc argument syntax is extended to allow the 'vnc'
>    and 'websocket' arguments to be listed multiple times.
>    This allows a single VNC server to listen on multiple
>    different names / addresses.
> 
> The io/ patch series that this previously depended on is now merged
> in git master.

Added to ui patch queue.

thanks,
  Gerd