Bug 1029987
| Summary: | spice-server reports incorrect listening address on monitor with "ipv6" option | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | David Jaša <djasa> |
| Component: | qemu-kvm-rhev | Assignee: | Gerd Hoffmann <kraxel> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | cfergeau, dblechte, djasa, hhuang, juzhang, knoel, kraxel, mazhang, mkenneth, qiguo, rbalakri, rh-spice-bugs, virt-maint, xfu |
| Target Milestone: | rc | ||
| Target Release: | 7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu 2.1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1029983 | Environment: | |
| Last Closed: | 2015-03-05 09:43:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1029983 | ||
| Bug Blocks: | |||
|
Description
David Jaša
2013-11-13 16:17:12 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"); Hmm, qemu doesn't know what spice-server is listening on, especially in case nothing was explicitly configured (ipv4, ipv6 options) and it depends on the host configuration whenever ipv6 or ipv6 is used by default. So we could simply replace "0.0.0.0" with "*" wildcard. Sounds ok? Better suggestions? Reporting a wildcard is a good thing, simple and not misleading. upstream commit 4f60af9ac00800d5833f6ec4317535aeaddb1616 Reproduce this bug with qemu-kvm-1.5.3-66.el7.x86_64
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5800
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) info spice
Server:
address: 0.0.0.0:5800
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -antpu|grep 5800
tcp6 0 0 :::5800 :::* LISTEN 14780/qemu-kvm
so this bug can be reproduced.
Verify with qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
For amd & Intel host.
/usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5800
QEMU 2.0.92 monitor - type 'help' for more information
(qemu) info spice
Server:
address: *:5800
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -antpu|grep 5800
tcp6 0 0 :::5800 :::* LISTEN 14970/qemu-kvm
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice addr=::,disable-ticketing,port=5800
(qemu) info spice
Server:
address: :::5800
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -antpu|grep 5800
tcp6 0 0 :::5800 :::* LISTEN 15332/qemu-kvm
use spice client to connect to spice server via ipv4 or ipv6 address.
result:
spice client connected successfully.
Gerd,
QE need confirm two questions with you for this test result.
1. According to this test result, Is this bug fixed?
2. If specify ipv6('-spice ipv6' or '-spice addr=::'), then spice client can connect to spice server with ipv4 or ipv6 address. Conversely,If specify ipv4(-spice ipv4),then spice client only can use ipv4 address to connect spice server. Is it expect?
Reproduce this bug with qemu-kvm-1.5.3-66.el7.x86_64
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5800
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) info spice
Server:
address: 0.0.0.0:5800
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -antpu|grep 5800
tcp6 0 0 :::5800 :::* LISTEN 14780/qemu-kvm
so this bug can be reproduced.
Verify this bug with qemu-kvm-rhev-2.1.0-2.el7.x86_64
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,disable-ticketing,port=5900
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) info spice
Server:
address: *:5900
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -anp |grep 5900
tcp6 0 0 :::5900 :::* LISTEN 17300/qemu-kvm
So according to above, qemu-kvm replace "0.0.0.0" with "*" wildcard, so this bug has been fixed.
Additional infos:
Test with ipv6 address "::" and "::1" specified in cml
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,addr=::,disable-ticketing,port=5900
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) info spice
Server:
address: :::5900
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -anp |grep 5900
tcp6 0 0 :::5900 :::* LISTEN 17359/qemu-kvm
# /usr/libexec/qemu-kvm -monitor stdio -vga qxl -spice ipv6,addr=::1,disable-ticketing,port=5900
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) info spice
Server:
address: ::1:5900
migrated: false
auth: none
compiled: 0.12.4
mouse-mode: server
Channels: none
# netstat -anp |grep 5900
tcp6 0 0 ::1:5900 :::* LISTEN 17373/qemu-kvm
Under hmp, the spice server is using ipv6 format address, and listening ipv6 address with tcp port.
> Gerd, > QE need confirm two questions with you for this test result. > 1. According to this test result, Is this bug fixed? Yes. > 2. If specify ipv6('-spice ipv6' or '-spice addr=::'), then spice client can > connect to spice server with ipv4 or ipv6 address. Conversely,If specify > ipv4(-spice ipv4),then spice client only can use ipv4 address to connect > spice server. Is it expect? ipv6 sockets allow ipv4 connects (when binding to the wildcard address), so this is normal behavior. Hi Gerd, You changed the component to qemu-kvm-rhev.Do you plan fix this bug on qemu-kvm ? Since qemu-kvm still hit this problem. Thanks, Mazhang. (In reply to mazhang from comment #12) > Hi Gerd, > > You changed the component to qemu-kvm-rhev.Do you plan fix this bug on > qemu-kvm ? Not planned, low priority bug. 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. https://rhn.redhat.com/errata/RHSA-2015-0624.html |