linux <3.9 doesn't support socket option SO_REUSEPORT

Bug #1451691 reported by stanzgy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
stanzgy
Kilo
Fix Committed
High
Kiall Mac Innes
designate (Ubuntu)
Fix Released
High
Unassigned
Vivid
Fix Released
Undecided
Unassigned

Bug Description

designate-mdns couldn‘t run on Debian 3.2 with 3.2.0 kernel.

hzzhanggy@10-180-2-29:~$ uname -a
Linux 10-180-2-29 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux

2015-05-05 10:42:24.252 1250 ERROR designate.openstack.common.threadgroup [-] [Errno 92] Protocol not available
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup Traceback (most recent call last):
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/designate/openstack/common/threadgroup.py", line 145, in wait
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup x.wait()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/designate/openstack/common/threadgroup.py", line 47, in wait
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup return self.thread.wait()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup return self._exit_event.wait()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 121, in wait
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup return hubs.get_hub().switch()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 294, in switch
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup return self.greenlet.switch()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup result = function(*args, **kwargs)
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/designate/openstack/common/service.py", line 491, in run_service
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup service.start()
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/designate/service.py", line 243, in start
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup self._service_config.tcp_backlog)
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/designate/dnsutils.py", line 250, in bind_tcp
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup sock_tcp.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup File "/usr/lib/python2.7/socket.py", line 224, in meth
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup return getattr(self._sock,name)(*args)
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup error: [Errno 92] Protocol not available
2015-05-05 10:42:24.252 1250 TRACE designate.openstack.common.threadgroup
2015-05-05 10:42:24.255 1250 INFO designate.service [-] Stopping mdns service

According to https://lwn.net/Articles/542629/ , Linux introduced SO_REUSEPORT socket option in 3.9 release. We should handle this gracefully for those kernel version <3.9

Related branches

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/180045

Changed in designate:
assignee: nobody → stanzgy (stanzgy)
status: New → In Progress
Kiall Mac Innes (kiall)
Changed in designate:
milestone: none → liberty-1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/180045
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=c09a295c403e19811bf748d88155b368412c31bd
Submitter: Jenkins
Branch: master

commit c09a295c403e19811bf748d88155b368412c31bd
Author: stanzgy <email address hidden>
Date: Tue May 5 15:18:47 2015 +0800

    Fixed SO_REUSEPORT not supported by Linux <3.9

    Change-Id: If2dec4555dc436c1b16d7298c6f37d99e0e48cea
    Closes-Bug: 1451691

Changed in designate:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/180573

Revision history for this message
James Page (james-page) wrote :

Also causing issues on older package builders in launchpad which are only running 3.2.0 kernels.

Raising a bug task for Ubuntu so we can fixup kilo release.

Changed in designate (Ubuntu):
status: New → In Progress
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :

[Impact]
Use of SO_REUSEPORT causes test failures on older distro builders (3.2.0 kernel)

[Test Case]
Build designate package in distro.

[Regression Potential]
Minimal - opportunistic use of feature if allowed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/kilo)

Reviewed: https://review.openstack.org/180573
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=6cd3cf1ce21daff91d18718a9840302029d81d8b
Submitter: Jenkins
Branch: stable/kilo

commit 6cd3cf1ce21daff91d18718a9840302029d81d8b
Author: stanzgy <email address hidden>
Date: Tue May 5 15:18:47 2015 +0800

    Fixed SO_REUSEPORT not supported by Linux <3.9

    Change-Id: If2dec4555dc436c1b16d7298c6f37d99e0e48cea
    Closes-Bug: 1451691
    (cherry picked from commit c09a295c403e19811bf748d88155b368412c31bd)

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello stanzgy, or anyone else affected,

Accepted designate into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/designate/2015.1.0-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in designate (Ubuntu Vivid):
status: New → Fix Committed
tags: added: verification-needed
James Page (james-page)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package designate - 2015.1.0-0ubuntu1.1

---------------
designate (2015.1.0-0ubuntu1.1) vivid; urgency=medium

  * d/p/fix-SO_REUSEPORT-usage.patch: Cherry pick workaround for use of
    SO_REUSEPORT socket option with older kernel versions, resolving
    FTBFS on distro builders which use 3.2.0 kernels (LP: #1451691).

designate (2015.1.0-0ubuntu1) vivid; urgency=medium

  * New upstream release for OpenStack Kilo. (LP: #1449744)

 -- James Page <email address hidden> Mon, 11 May 2015 12:00:25 +0100

Changed in designate (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for designate has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package designate - 2015.1.0-0ubuntu1.1

---------------
designate (2015.1.0-0ubuntu1.1) vivid; urgency=medium

  * d/p/fix-SO_REUSEPORT-usage.patch: Cherry pick workaround for use of
    SO_REUSEPORT socket option with older kernel versions, resolving
    FTBFS on distro builders which use 3.2.0 kernels (LP: #1451691).

designate (2015.1.0-0ubuntu1) vivid; urgency=medium

  * New upstream release for OpenStack Kilo. (LP: #1449744)

 -- James Page <email address hidden> Mon, 11 May 2015 12:00:25 +0100

Changed in designate (Ubuntu Vivid):
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: liberty-1 → 1.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers