Bug 1368447

Summary: -net socket,listen and -net socket,connect does not work anymore
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amit.shah, berrange, cfergeau, crobinso, dgilbert, dwmw2, harald, itamar, marcandre.lureau, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-16 01:18:45 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:

Description Harald Hoyer 2016-08-19 12:37:25 UTC
connecting two local qemu-kvm with -net socket,listen=127.0.0.1:12320  in one machine and -net socket,connect=127.0.0.1:12320  in the other does not work anymore

WORKS: qemu-kvm-2.6.0-6.fc25.x86_64
FAILS: qemu-kvm-2.7.0-0.1.rc2.fc26.x86_64

Comment 1 Cole Robinson 2016-08-19 12:55:59 UTC
Maybe this?

commit 1dc8a6695c731abb7461c637b2512c3670d82be4
Author: Marc-André Lureau <marcandre.lureau>
Date:   Tue Aug 16 12:33:32 2016 +0400

    char: fix waiting for TLS and telnet connection

The fix seems more general than that subject suggests though. It's in -rc3 which I'll build now, then let me know if it fixes your case

Comment 2 Marc-Andre Lureau 2016-08-19 15:12:30 UTC
with or without the patch, I can do

1. qemu-system-x86_64 -net socket,listen=127.0.0.1:12320
2. qemu-system-x86_64 -net socket,connect=127.0.0.1:12320

Could you describe in more details your tests and failure/error. Thank

Comment 3 Harald Hoyer 2016-08-22 11:01:04 UTC
(In reply to Marc-Andre Lureau from comment #2)
> with or without the patch, I can do
> 
> 1. qemu-system-x86_64 -net socket,listen=127.0.0.1:12320

in this a dhcp server is running

> 2. qemu-system-x86_64 -net socket,connect=127.0.0.1:12320

in this a dhcp client is running

> 
> Could you describe in more details your tests and failure/error. Thank

there is no network connectivity between those two machines, which results in the client not getting any IP address from the server

Downgrading qemu fixes the problem as noted in comment #1

Comment 4 Harald Hoyer 2016-08-22 11:07:36 UTC
not fixed with qemu-kvm-2:2.7.0-0.2.rc3.fc26.x86_64

Comment 5 Harald Hoyer 2016-08-22 11:24:12 UTC
Reproducer:

$ sudo dnf install dash asciidoc nfs-utils dhcp-server kmod-devel gcc qemu
$ git clone https://github.com/dracutdevs/dracut.git
$ cd dracut
$ ./configure
$ make
$ cd test/TEST-20-NFS/

This can be repeated to test qemu-kvm versions
$ sudo make clean setup run

Comment 6 Marc-Andre Lureau 2016-08-23 08:12:02 UTC
The regression comes from:

commit 7e8449594c92992342512061160bc846c922016d
Author: Ashijeet Acharya <ashijeetacharya>
Date:   Sat Jun 18 13:24:02 2016 +0530

    Change net/socket.c to use socket_*() functions

I am working on a fix.

Comment 7 Marc-Andre Lureau 2016-08-23 09:47:09 UTC
I sent 2 patches upstream for 2.7

Comment 9 Cole Robinson 2016-10-16 01:18:45 UTC
This is fixed in f25+ with the 2.7.0 release