Todd Lipcon has submitted this change and it was merged. Change subject: Workaround test failures running with MIT krb5 1.10 ......................................................................
Workaround test failures running with MIT krb5 1.10 This fixes a variety of issues seen when running on el6, which has MIT krb5 1.10. * This version doesn't support KRB5_CLIENT_KTNAME. So, we need to explicitly login servers from their provided keytabs when the server starts. This ensures that servers have proper client credentials in order to send kerberized RPCs to other servers. Along the way, I changed the ExternalMiniCluster to provide IP-specific keytabs to the server. * In our minicluster, we use strange local IPs like '127.x.y.z' for testing. These don't have any associated hostnames in reverse DNS. MIT krb5 has a bug (or lack of feature) whereby it cannot handle service principals whose hostname component is a numeric IP rather than a hostname. Specifically, it fails to determine the Kerberos Realm for a principal with a numeric host. This patch works around the issue by overriding the krb5_get_host_realm() function using a combination of LD_PRELOAD and statically including this symbol in our tests. See the comments at the top of krb5_realm_override.cc for details. With this patch, external_mini_cluster-test passes on el6 whereas it used to fail. Change-Id: I708334cbbee35d2629a38a369e63c1dc309ed91b Reviewed-on: http://gerrit.cloudera.org:8080/4990 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M CMakeLists.txt M cmake_modules/FindKerberos.cmake A cmake_modules/FindKerberosPrograms.cmake M src/kudu/integration-tests/CMakeLists.txt M src/kudu/integration-tests/external_mini_cluster-test.cc M src/kudu/integration-tests/external_mini_cluster.cc M src/kudu/integration-tests/external_mini_cluster.h M src/kudu/security/CMakeLists.txt A src/kudu/security/init.cc A src/kudu/security/init.h A src/kudu/security/test/krb5_realm_override.cc M src/kudu/security/test/mini_kdc-test.cc M src/kudu/server/CMakeLists.txt M src/kudu/server/server_base.cc M src/kudu/util/CMakeLists.txt M src/kudu/util/test_main.cc 16 files changed, 416 insertions(+), 41 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/4990 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I708334cbbee35d2629a38a369e63c1dc309ed91b Gerrit-PatchSet: 9 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]>
