You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2017/03/15 05:06:35 UTC

kudu git commit: [security-itest] enable tracing of KRPC negotiation

Repository: kudu
Updated Branches:
  refs/heads/master c658c8696 -> f4caa6371


[security-itest] enable tracing of KRPC negotiation

Enabled tracing of KRPC client/server negotiation in security-itest
for ease of troubleshooting and debugging.

Change-Id: I320f6781f5637185e9bc572c093392d9f8fe9ce8
Reviewed-on: http://gerrit.cloudera.org:8080/6403
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/f4caa637
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/f4caa637
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/f4caa637

Branch: refs/heads/master
Commit: f4caa6371f34456fe322731ede9c39b8f840f9ff
Parents: c658c86
Author: Alexey Serbin <as...@cloudera.com>
Authored: Tue Mar 14 18:47:05 2017 -0700
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Wed Mar 15 04:06:02 2017 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/security-itest.cc | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/f4caa637/src/kudu/integration-tests/security-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/security-itest.cc b/src/kudu/integration-tests/security-itest.cc
index 4dec15f..6cd5d36 100644
--- a/src/kudu/integration-tests/security-itest.cc
+++ b/src/kudu/integration-tests/security-itest.cc
@@ -42,10 +42,12 @@ class SecurityITest : public KuduTest {
   SecurityITest() {
     cluster_opts_.enable_kerberos = true;
     cluster_opts_.num_tablet_servers = 3;
+    cluster_opts_.extra_master_flags.push_back("--rpc_trace_negotiation");
+    cluster_opts_.extra_tserver_flags.push_back("--rpc_trace_negotiation");
   }
-  void StartCluster() {
+  Status StartCluster() {
     cluster_.reset(new ExternalMiniCluster(cluster_opts_));
-    ASSERT_OK(cluster_->Start());
+    return cluster_->Start();
   }
 
   Status TrySetFlagOnTS() {
@@ -132,7 +134,7 @@ void SecurityITest::SmokeTestCluster() {
 // Test creating a table, writing some data, reading data, and dropping
 // the table.
 TEST_F(SecurityITest, SmokeTestAsAuthorizedUser) {
-  StartCluster();
+  ASSERT_OK(StartCluster());
 
   ASSERT_OK(cluster_->kdc()->Kinit("test-user"));
   NO_FATALS(SmokeTestCluster());
@@ -154,7 +156,7 @@ TEST_F(SecurityITest, SmokeTestAsAuthorizedUser) {
 // (Heimdal) caches the non-existence of client credentials, which causes
 // subsequent tests to fail.
 TEST_F(SecurityITest, TestNoKerberosCredentials) {
-  StartCluster();
+  ASSERT_OK(StartCluster());
   ASSERT_OK(cluster_->kdc()->Kdestroy());
 
   client::sp::shared_ptr<KuduClient> client;
@@ -171,7 +173,7 @@ TEST_F(SecurityITest, TestNoKerberosCredentials) {
 
 // Test cluster access by a user who is not authorized as a client.
 TEST_F(SecurityITest, TestUnauthorizedClientKerberosCredentials) {
-  StartCluster();
+  ASSERT_OK(StartCluster());
   ASSERT_OK(cluster_->kdc()->Kinit("joe-interloper"));
   client::sp::shared_ptr<KuduClient> client;
   Status s = cluster_->CreateClient(nullptr, &client);
@@ -182,7 +184,7 @@ TEST_F(SecurityITest, TestUnauthorizedClientKerberosCredentials) {
 
 // Test superuser actions when authorized as a superuser.
 TEST_F(SecurityITest, TestAuthorizedSuperuser) {
-  StartCluster();
+  ASSERT_OK(StartCluster());
 
   ASSERT_OK(cluster_->kdc()->Kinit("test-admin"));
 
@@ -202,7 +204,7 @@ TEST_F(SecurityITest, TestAuthorizedSuperuser) {
 TEST_F(SecurityITest, TestDisableWebUI) {
   cluster_opts_.extra_master_flags.push_back("--webserver_enabled=0");
   cluster_opts_.extra_tserver_flags.push_back("--webserver_enabled=0");
-  StartCluster();
+  ASSERT_OK(StartCluster());
   NO_FATALS(SmokeTestCluster());
 }
 
@@ -213,7 +215,7 @@ TEST_F(SecurityITest, TestDisableAuthenticationEncryption) {
   cluster_opts_.extra_master_flags.push_back("--rpc_encryption=disabled");
   cluster_opts_.extra_tserver_flags.push_back("--rpc_encryption=disabled");
   cluster_opts_.enable_kerberos = false;
-  StartCluster();
+  ASSERT_OK(StartCluster());
   NO_FATALS(SmokeTestCluster());
 }