Hide Forgot
Description of problem: "-spice ipv6" and "-spice addr=::" invocations are functionally equivalent (spice-server listens on address "::") but "-spice ipv6" reports listening address to be 0.0.0.0 instead of "::". Version-Release number of selected component (if applicable): spice-server-0.12.4-6.el6.x86_64 How reproducible: always Steps to Reproduce: 1. run two qemu-kvm processes with monitor with "-spice ipv6" and "-spice addr=::" 2. look at listening addresses using "info spice" monitor command 3. look at listening addresses using system tools (e.g. netstat) Actual results: address reported by "info spice" doesn't match address reported by netstat for "-spice ipv6" case Expected results: address reported by "info spice" matches the one from "netstat" Additional info: $ qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5800 iQEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: 0.0.0.0:5800 auth: none Channels: none (qemu) quit $ qemu-kvm -monitor stdio -vga qxl -spice addr=::,disable-ticketing,port=5800 QEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: :::5800 auth: none Channels: none (qemu) // both cases # netstat -putna | grep 5800 tcp 0 0 :::5800 :::* LISTEN 12564/qemu-kvm
This is caused by that code in qemu/ui/spice-core.c:qmp_query_spice() addr = qemu_opt_get(opts, "addr"); ... info->host = g_strdup(addr ? addr : "0.0.0.0");
(In reply to Christophe Fergeau from comment #1) > This is caused by that code in qemu/ui/spice-core.c:qmp_query_spice() > > addr = qemu_opt_get(opts, "addr"); > ... > info->host = g_strdup(addr ? addr : "0.0.0.0"); That doesn't sound particularly useful. Does spice-server proper has some means to dump the actual listening address?
Reproduce this bug with spice-server-0.12.4-6.el6.x86_64. host: RHEL6.5-20131105.6 kernel-2.6.32-431.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.415.el6_5.3.x86_64 steps: 1 run qemu-kvm with following cmdline [root@m2 ~]# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5900 QEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: 0.0.0.0:5900 auth: none Channels: none (qemu) q [root@m2 ~]# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice addr=::,disable-ticketing,port=5900 QEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: :::5900 auth: none Channels: none (qemu) Result: listening address to be 0.0.0.0 instead of "::" with "-spice ipv6"
See also: bug 1029987 (rhel7 version of this one, sitting in needinfo, waiting for feedback from reporter).
upstream commit 4f60af9ac00800d5833f6ec4317535aeaddb1616
patch posted.
Fix included in qemu-kvm-0.12.1.2-2.426.el6
Reproduce this bug on qemu-kvm-0.12.1.2-2.415.el6.x86_64. Steps: [root@dhcp-8-102 ~]# # /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5900 # /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5900 QEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: 0.0.0.0:5900 auth: none Channels: none (qemu) q Verified this bug on qemu-kvm-0.12.1.2-2.428.el6.x86_64. [root@dhcp-8-102 ~]# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5900 QEMU 0.12.1 monitor - type 'help' for more information (qemu) info spice Server: migrated: false address: *:5900 auth: none Channels: none (qemu) q # netstat -putna |grep 5900 tcp 0 0 :::5900 :::* LISTEN 20142/qemu-kvm As 1029987#c2 and 1029987#c3 mentioned, qemu-kvm replace "0.0.0.0" with "*" wildcard, so this bug has been fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1490.html