Bug 1038094

Summary: Qpidd erratically not listening to 0.0.0.0 at boot if using DHCP
Product: [Fedora] Fedora Reporter: Gabriele Cerami <gcerami>
Component: qpid-cppAssignee: Darryl L. Pierce <dpierce>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dpierce, gcerami, jose.p.oliveira.oss, nsantos, tross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.24-5.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-16 23:01:04 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:

Description Gabriele Cerami 2013-12-04 12:07:23 UTC
Description of problem:

qpidd does not listen to 0.0.0.0 if none of the physical network devices
has an IPv4 assigned.
Because network.target is only listed as a "Requires" in the qpidd.service file, qpidd and network service may be started at the same time.
The problem is that if IPv4 on network devices are obtained through DHCP, qpidd may be started before IPv4 are assigned and it ends up not listening to 0.0.0.0 at boot.  

Version-Release number of selected component:
Tested on Version 0.24 Release 3.fc19.1

How reproducible:
The bugs does not show up if DHCP server are fast enough to respond before qpidd checks for IPv4 on physical interfaces.

Steps to Reproduce the behaviour of qpidd:
1. systemctl stop qpidd.service
2. ip a del <ipaddress>/<netmask> dev <physical device>
3. systemctl start qpidd.service
4. netstat -ntupa | grep qpi

Actual results:
tcp6       0      0 :::5672                 :::*                    LISTEN      388/qpidd           

Expected results:
tcp        0      0 0.0.0.0:5672            0.0.0.0:*               LISTEN      388/qpidd           
tcp6       0      0 :::5672                 :::*                    LISTEN      388/qpidd           


Steps to Reproduce the bug:
1. Set up a physical device to use DHCP at boot
2. Set up a slow DHCP server or slow network
3. install qpid-cpp-server
4. reboot
5. netstat -ntupa | grep qpi

I understand that mocking a slow DHCP server is not an easy task. I hit the bug in a busy test environment while starting 3 virtual machines with 2 physical device each at the same time.


Additional info:
I'm not sure why qpidd checks for IPv4 availability and if this beahaviour should be corrected, but a fast fix to this could be to set network.target as a "After" not "Requires" option on qpidd.service file. In this way qpidd have to wait for network service to finish.
This is the workaround I used and it worked 100% of the time.

Comment 1 Fedora Update System 2013-12-05 21:50:20 UTC
qpid-cpp-0.24-5.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/qpid-cpp-0.24-5.fc19

Comment 2 Fedora Update System 2013-12-05 22:16:30 UTC
qpid-cpp-0.24-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qpid-cpp-0.24-5.fc18

Comment 3 Fedora Update System 2013-12-07 06:56:54 UTC
Package qpid-cpp-0.24-5.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qpid-cpp-0.24-5.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22892/qpid-cpp-0.24-5.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-12-16 23:01:04 UTC
qpid-cpp-0.24-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2013-12-16 23:02:31 UTC
qpid-cpp-0.24-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.