Bug 1509265

Summary: The guest failed to start with UDP chardev which host='localhost'/'' and localaddr=ipv4_address
Product: Red Hat Enterprise Linux 7 Reporter: Yanqiu Zhang <yanqzhan>
Component: qemu-kvm-rhevAssignee: jason wang <jasowang>
Status: CLOSED DEFERRED QA Contact: Pei Zhang <pezhang>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: aadam, ailan, chayang, dyuan, fjin, jasowang, juzhang, knoel, mzhan, pezhang, rkhan, siliu, virt-maint, xfu, xuzhang, yanqzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1732211 (view as bug list) Environment:
Last Closed: 2019-07-22 20:31:29 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:    
Bug Blocks: 1732211    

Description Yanqiu Zhang 2017-11-03 12:41:16 UTC
Description of problem:
The guest failed to start with UDP chardev which host='localhost'/'' and localaddr=ipv4 address

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-4.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
scenario 1. host=''
#  /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=,port=1234,localaddr=127.0.0.1,localport=2234
qemu-kvm: -chardev udp,id=charrng0,host=,port=1234,localaddr=127.0.0.1,localport=2234: address resolution failed for 127.0.0.1:2234: Address family for hostname not supported

scenario 2. host='localhost'
#  /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host='localhost',port=1234,localaddr=127.0.0.1,localport=2234
qemu-kvm: -chardev udp,id=charrng0,host=localhost,port=1234,localaddr=127.0.0.1,localport=2234: address resolution failed for 127.0.0.1:2234: Address family for hostname not supported


Actual results:
unable to execute QEMU command 'chardev-add' when start guest with UDP chardev which host='localhost'/'' and localaddr=ipv4 address, and get error: "Address family for hostname not supported".

Expected results:
Guest should be successfully started with UDP chardev which host='localhost'/'' and localaddr=ipv4 without error.


Additional info:
1. host=ipv4_addr and localaddr='' will succeed:
#  /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host='127.0.0.1',port=1234,localaddr=,localport=2234VNC server running on ::1:5900

# netstat -tunp |grep 1234
udp        0      0 127.0.0.1:2234          127.0.0.1:1234          ESTABLISHED 8101/qemu-kvm

2.Both host='' and localaddr='' will also succeed:
#  /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=,port=1234,localaddr=,localport=2234VNC server running on ::1:5900

# netstat -tunp |grep 1234
udp6       0      0 ::1:2234                ::1:1234                ESTABLISHED 8143/qemu-kvm

Comment 2 jason wang 2017-11-17 06:51:32 UTC
Defer to 7.6 as we don't see any complain from libvirt.

Comment 3 jason wang 2018-08-06 07:42:20 UTC
Can QE reproduce this now?

Comment 4 xiywang 2018-09-05 09:02:55 UTC
Yes it still can be reproduced on RHEL7.6

kernel-3.10.0-942.el7.x86_64
qemu-kvm-rhev-2.12.0-12.el7.x86_64

scenario 1:
# /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=,port=1234,localaddr=127.0.0.1,localport=2345
qemu-kvm: -chardev udp,id=charrng0,host=,port=1234,localaddr=127.0.0.1,localport=2345: address resolution failed for 127.0.0.1:2345: Address family for hostname not supported

scenario 2:
# /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=localhost,port=1234,localaddr=127.0.0.1,localport=2345
qemu-kvm: -chardev udp,id=charrng0,host=localhost,port=1234,localaddr=127.0.0.1,localport=2345: address resolution failed for 127.0.0.1:2345: Address family for hostname not supported

scenario 3:
# /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host='127.0.0.1',port=1234,localaddr=,localport=2345
VNC server running on ::1:5901

scenario 4:
# /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=,port=1234,localaddr=,localport=2345
VNC server running on ::1:5901

Comment 5 jason wang 2018-11-26 02:37:39 UTC
Too late for 7.7, consider it wouldn't be used by libvirt. Defer it first.

Comment 11 Red Hat Bugzilla 2023-09-18 00:12:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days