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 2020/03/09 04:11:02 UTC

[kudu] branch master updated (f4bab12 -> 05dd6f8)

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git.


    from f4bab12  common/tserver: replace gscoped_ptr with unique_ptr
     new f2ebb30  master: plumb metric for master leadership
     new 05dd6f8  [test-util] set OpenSSL security level for kudu CLI

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/kudu/integration-tests/master_replication-itest.cc |  7 +++++--
 src/kudu/master/sys_catalog.cc                         |  3 +--
 src/kudu/tools/tool_test_util.cc                       | 10 +++++++++-
 3 files changed, 15 insertions(+), 5 deletions(-)


[kudu] 02/02: [test-util] set OpenSSL security level for kudu CLI

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 05dd6f8d8c9ea8c10012bc7e90b19beabc74d303
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Mar 6 16:09:55 2020 -0800

    [test-util] set OpenSSL security level for kudu CLI
    
    This patch adds --openssl_security_level_override=1 option for all kudu
    CLI invocations run via RunKuduTool() utility function.  With that, the
    client-side parts of the kudu CLI are able to verify certificates signed
    by shorter keys generated for test scenarios even when run on
    contemporary Linux OS distributions like RHEL/CentOS 8.x where the
    OpenSSL library is built with default security level 2.
    
    This is a follow-up to 93e85876f472b2668604ce5c15eafb17ce303989.
    
    Change-Id: I318621bc453ac5e25cd80070a9f3e56455e3f73b
    Reviewed-on: http://gerrit.cloudera.org:8080/15384
    Tested-by: Alexey Serbin <as...@cloudera.com>
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
 src/kudu/tools/tool_test_util.cc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/kudu/tools/tool_test_util.cc b/src/kudu/tools/tool_test_util.cc
index a0cbbcb..59c3696 100644
--- a/src/kudu/tools/tool_test_util.cc
+++ b/src/kudu/tools/tool_test_util.cc
@@ -55,8 +55,10 @@ Status RunKuduTool(const vector<string>& args, string* out, string* err,
                    const std::string& in) {
   vector<string> total_args = { GetKuduToolAbsolutePath() };
 
-  // Speed up filesystem-based operations.
+  // Some scenarios might add unsafe flags for testing purposes.
   total_args.emplace_back("--unlock_unsafe_flags");
+
+  // Speed up filesystem-based operations.
   total_args.emplace_back("--never_fsync");
 
   // Do not colorize glog's output (i.e. messages logged via LOG()) even
@@ -65,6 +67,12 @@ Status RunKuduTool(const vector<string>& args, string* out, string* err,
   // (e.g., the exact location of some substring/character in the output line).
   total_args.emplace_back("--nocolorlogtostderr");
 
+  // Kudu masters and tablet servers run as a part of external mini-cluster use
+  // shorter keys. Newer OS distros have OpenSSL built with the default security
+  // level higher than 1, so it's necessary to override it on the client
+  // side as well to allow clients to accept and verify TLS certificates.
+  total_args.emplace_back("--openssl_security_level_override=1");
+
   total_args.insert(total_args.end(), args.begin(), args.end());
   return Subprocess::Call(total_args, in, out, err);
 }


[kudu] 01/02: master: plumb metric for master leadership

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit f2ebb30d161df319050170114eb8e54561de91bb
Author: Andrew Wong <aw...@cloudera.com>
AuthorDate: Sun Mar 8 11:58:55 2020 -0700

    master: plumb metric for master leadership
    
    Change-Id: Ie6972a1b9f803e3e4f293c67b035f5e924c67df2
    Reviewed-on: http://gerrit.cloudera.org:8080/15386
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/integration-tests/master_replication-itest.cc | 7 +++++--
 src/kudu/master/sys_catalog.cc                         | 3 +--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/kudu/integration-tests/master_replication-itest.cc b/src/kudu/integration-tests/master_replication-itest.cc
index 4f586cf..d527feb 100644
--- a/src/kudu/integration-tests/master_replication-itest.cc
+++ b/src/kudu/integration-tests/master_replication-itest.cc
@@ -206,16 +206,19 @@ TEST_F(MasterReplicationTest, TestSysTablesReplication) {
   // so we need to loop and try all masters.
   while (true) {
     for (int i = 0; i < cluster_->num_masters(); i++) {
-      CatalogManager* catalog =
-          cluster_->mini_master(i)->master()->catalog_manager();
+      Master* master = cluster_->mini_master(i)->master();
+      CatalogManager* catalog = master->catalog_manager();
       CatalogManager::ScopedLeaderSharedLock l(catalog);
       if (l.first_failed_status().ok()) {
+        ASSERT_EQ(1, master->num_raft_leaders()->value());
         bool exists;
         ASSERT_OK(catalog->TableNameExists(kTableId1, &exists));
         ASSERT_TRUE(exists);
         ASSERT_OK(catalog->TableNameExists(kTableId2, &exists));
         ASSERT_TRUE(exists);
         return;
+      } else {
+        ASSERT_EQ(0, master->num_raft_leaders()->value());
       }
     }
     SleepFor(MonoDelta::FromMilliseconds(1));
diff --git a/src/kudu/master/sys_catalog.cc b/src/kudu/master/sys_catalog.cc
index 164b278..5d02dc9 100644
--- a/src/kudu/master/sys_catalog.cc
+++ b/src/kudu/master/sys_catalog.cc
@@ -401,9 +401,8 @@ Status SysCatalogTable::SetupTablet(
       Bind(&SysCatalogTable::SysCatalogStateChanged,
            Unretained(this),
            metadata->tablet_id())));
-  // TODO(awong): plumb master_->num_raft_leaders() here.
   RETURN_NOT_OK_SHUTDOWN(tablet_replica_->Init({ /*quiescing*/nullptr,
-                                                 /*num_leaders*/nullptr,
+                                                 master_->num_raft_leaders(),
                                                  master_->raft_pool() }),
                          "failed to initialize system catalog replica");