Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22961 )
Change subject: [socket] Fix test failure caused due to unsupported socket option ...................................................................... [socket] Fix test failure caused due to unsupported socket option setsockopt() system call doesn't support SO_REUSEPORT for a Unix domain socket. Due to this, following tests fail on certain linux versions (e.g. v6.15): - client-test.TestConnectViaUnixSocket - dns_alias-itest.TestBasic Although there is no support available, a graceful error handling was recently added as part of [1] commit. Linux kernel versions where [1] is present, error out with appropriate message and test also fails expectedly. However, for linux kernel versions (e.g. v5.15) where [1] is not present, the tests may pass, but setting of SO_REUSEPORT socket option may have no effect at all, potentially leading to confusion and undefined behavior in tests. The patch does the following to fix this: 1. Error out with appropriate error message if setting socket option (i.e. SO_REUSEPORT) on a Unix domain socket. 2. Add a group flag validator to ensure either of two flags is set: --rpc_listen_on_unix_domain_socket or --rpc_reuseport. 3. Explicitly initialise --rpc_reuseport flag in tests wherever required as per test expectations. [1] https://github.com/torvalds/linux/commit/5b0af621c3f6ef9261cf6067812f2fd9943acb4b Change-Id: Ice00b1c4fd1df78fa84c3dd2a79c968a4a91cc21 Reviewed-on: http://gerrit.cloudera.org:8080/22882 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Alexey Serbin <[email protected]> (cherry picked from commit 01e0aa93211c968d2dead9cf85bf54d8f9fec18c) Reviewed-on: http://gerrit.cloudera.org:8080/22961 Reviewed-by: Abhishek Chennaka <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/integration-tests/dns_alias-itest.cc M src/kudu/master/mini_master.cc M src/kudu/rpc/messenger.cc M src/kudu/server/server_base.cc 4 files changed, 27 insertions(+), 4 deletions(-) Approvals: Abhishek Chennaka: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/22961 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: branch-1.18.x Gerrit-MessageType: merged Gerrit-Change-Id: Ice00b1c4fd1df78fa84c3dd2a79c968a4a91cc21 Gerrit-Change-Number: 22961 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
