RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1029983 - spice-server reports incorrect listening address on monitor with "ipv6" option
Summary: spice-server reports incorrect listening address on monitor with "ipv6" option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 6.6
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1029987
TreeView+ depends on / blocked
 
Reported: 2013-11-13 16:13 UTC by David Jaša
Modified: 2014-10-14 06:54 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.426.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1029987 (view as bug list)
Environment:
Last Closed: 2014-10-14 06:54:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description David Jaša 2013-11-13 16:13:54 UTC
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

Comment 1 Christophe Fergeau 2013-11-13 16:47:57 UTC
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");

Comment 2 David Jaša 2013-11-14 14:40:02 UTC
(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?

Comment 3 mazhang 2013-11-20 05:34:45 UTC
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"

Comment 4 Gerd Hoffmann 2014-04-14 09:21:24 UTC
See also: bug 1029987 (rhel7 version of this one, sitting in needinfo, waiting for feedback from reporter).

Comment 5 Gerd Hoffmann 2014-05-09 10:35:18 UTC
upstream commit 4f60af9ac00800d5833f6ec4317535aeaddb1616

Comment 7 Gerd Hoffmann 2014-05-09 11:01:15 UTC
patch posted.

Comment 8 Jeff Nelson 2014-05-19 20:03:15 UTC
Fix included in qemu-kvm-0.12.1.2-2.426.el6

Comment 10 mazhang 2014-07-03 07:35:07 UTC
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.

Comment 11 errata-xmlrpc 2014-10-14 06:54:25 UTC
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


Note You need to log in before you can comment on or make changes to this bug.