Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#5243 closed defect (fixed)

failing tests on RedHat 6.4 due to lack of SO_REUSEPORT socket option

Reported by: wlodekwencel Owned by: fdupont
Priority: low Milestone: Kea1.3 beta
Component: libdhcp Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 2
Total Hours: 2 Internal?: no

Description

We have bunch of failing unit tests, there are around for quite some time already:

IfaceMgrTest?.closeSockets
IfaceMgrTest?.receiveTimeout6
IfaceMgrTest?.sockets6
IfaceMgrTest?.socketsFromIface
IfaceMgrTest?.socketsFromAddress
IfaceMgrTest?.socketsFromRemoteAddress
IfaceMgrTest?.sendReceive6
PktFilterInet6Test.openSocket
PktFilterInet6Test.send
PktFilterInet6Test.receive
TestControlTest?.Packet6
TestControlTest?.Packet6Relayed
TestControlTest?.Packet6ExchangeFromTemplate
TestControlTest?.Packet6Exchange
TestControlTest?.Packet6ExchangePrefixDelegation
TestControlTest?.Packet6ExchangeAddressAndPrefix
TestControlTest?.processRenew6
TestControlTest?.processRelease6

Subtickets

Attachments (1)

5243.diff (636 bytes) - added by fdupont 3 years ago.
patch to compile on RedHat?

Download all attachments as: .zip

Change History (15)

comment:1 Changed 3 years ago by tomek

  • Component changed from Unclassified to libdhcp
  • Milestone changed from Kea-proposed to Kea1.2-final
  • Priority changed from medium to low

As discussed on 2017-04-20 call, accepting in 1.2-final as low. There's a chance we may be able to do it, but if not, we won't slip any dates because of it.

Changed 3 years ago by fdupont

patch to compile on RedHat?

comment:2 Changed 3 years ago by fdupont

As it was introduced by #5201 I reopened the ticket and merged the fix.

comment:3 Changed 3 years ago by fdupont

IMHO the problem is the REUSEPORT socket option which is not available on all RedHat?'s, cf https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux (search for REUSEPORT). BTW jenkins uses a 6.4 when all docs say the socket option was back ported in 6.5.

comment:4 Changed 3 years ago by tomek

  • Milestone changed from Kea1.2-final to Kea1.3

Very good find, Francis. Ok, the nature of the problem is understood now. Updated known issues list. Moving this ticket to 1.3.

comment:5 Changed 3 years ago by tomek

  • Summary changed from failing tests on RedHat to failing tests on RedHat 6.4 due to lack of SO_REUSEPORT socket option

comment:6 Changed 3 years ago by fdupont

I created a trac5243x branch to check on Jenkins: the problem is the SO_REUSEPORT which is defined (so the #ifdef matches) but not supported: the worse combination and IMHO a system bug...

comment:7 Changed 3 years ago by fdupont

The real question is what should be the scope of the fix: all RedHat's?

comment:8 Changed 2 years ago by fdupont

See RT 35591 too about the same issue for ISC DHCP.

comment:9 Changed 2 years ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

comment:10 Changed 2 years ago by fdupont

  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing

Done. Jenkins is validating the patch (ignore ENOPROTOOPT on SO_REUSEPORT) on RedHat?.

comment:11 Changed 2 years ago by tomek

  • Owner changed from UnAssigned to tomek

comment:12 Changed 2 years ago by tomek

  • Add Hours to Ticket changed from 0 to 2
  • Owner changed from tomek to fdupont
  • Total Hours changed from 0 to 2

Jenkins build (https://jenkins.isc.org/view/Kea_BuildFarm-developers/job/RedHat_6.4_64_branch/49/#showFailuresLink) confirmed that those unit-tests are now passing. There's a depressing number of other unit-test failures on that system, but they are out of scope for this ticket.

I have reviewed the change and it looks fine, although I pushed a small comment explaining that 6.4 is affected, but other versions may be too.

I have also run the tests on Ubuntu 16.04, but its kernel supports SO_REUSEPORT, so the problem didn't manifest itself before the fix.

I tried to upgrade my CentOS 6.3 (kea didn't compile due to lack of C++11 support), but it takes forever and I gave up.

You probably need a ChangeLog? entry for this. Something like "Unit-tests for libdhcp now ignore ENOPROTOPT when setting SO_REUSEPORT to improve compatibility with older RedHat? versions."

Please pull, review and merge.

comment:13 Changed 2 years ago by fdupont

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged. Closing. BTW I put it in [bug] when it should be in [port] but [port] does not exist.

comment:14 Changed 2 years ago by vicky

  • Milestone changed from Kea1.3 to Kea1.3 beta

Milestone renamed

Note: See TracTickets for help on using tickets.