This is an automated email from the ASF dual-hosted git repository.
granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 647a3d2f18576ca4f17c0a80f10590ca0187e6b6
Author: Andrew <anjuwo@gmail.com>
AuthorDate: Sat Mar 21 21:45:04 2020 -0700
server: make FS layout creation message less agressive
When we start a Kudu server, we first attempt to open an existing FS
layout, and if this fails, we assume that this was intentional and that
we're actually deploying a new server, so we'll create some new FS
metadata. The error message for this is a bit jarring:
I0110 22:35:52.430444 1043 fs_manager.cc:263] Metadata directory not provided
I0110 22:35:52.430590 1043 fs_manager.cc:269] Using write-ahead log directory (fs_wal_dir)
as metadata directory
I0110 22:35:52.430953 1043 server_base.cc:451] Could not load existing FS layout: Not
found: could not find a healthy instance file
I0110 22:35:52.431128 1043 server_base.cc:452] Attempting to create new FS layout instead
I0110 22:35:52.434439 1043 fs_manager.cc:617] Generated new instance metadata in path
/tmp/dist-test-tasklK1NQQ/test-tmp/client_failover-itest.0.ClientFailoverTServerTimeoutITest.FailoverOnLeaderTimeout.1578695741089585-462/minicluster-data/ts-2/data/instance:
uuid: "230bae04bca94f7989168f2ce71830fd"
format_stamp: "Formatted at 2020-01-10 22:35:52 on dist-test-slave-dist-test-slave-nntq"
I0110 22:35:52.435400 1043 fs_manager.cc:617] Generated new instance metadata in path
/tmp/dist-test-tasklK1NQQ/test-tmp/client_failover-itest.0.ClientFailoverTServerTimeoutITest.FailoverOnLeaderTimeout.1578695741089585-462/minicluster-data/ts-2/wal/instance:
uuid: "230bae04bca94f7989168f2ce71830fd"
format_stamp: "Formatted at 2020-01-10 22:35:52 on dist-test-slave-dist-test-slave-nntq"
I0110 22:35:52.440639 1043 dir_util.cc:225] Instance is unhealthy: Not found: Failed
to read metadata file from /tmp/dist-test-tasklK1NQQ/test-tmp/client_failover-itest.0.ClientFailoverTServerTimeoutITest.FailoverOnLeaderTimeout.1578695741089585-462/minicluster-data/ts-2/data/data/block_manager_instance:
/tmp/dist-test-tasklK1NQQ/test-tmp/client_failover-itest.0.ClientFailoverTServerTimeoutITest.FailoverOnLeaderTimeout.1578695741089585-462/minicluster-data/ts-2/data/data/block_manage
[...]
I0110 22:35:52.456311 1043 fs_manager.cc:518] Time spent creating directory manager:
real 0.020s user 0.017s sys 0.003s
I updated the dir_util message to be a VLOG instead. If the directory is
failed, this will surface as an error later down the line with actual
warning logs. I also made the initial server_base messages less
concerning.
Change-Id: Iba600eb4fbfecc444731d8ae3e971785fd703785
Reviewed-on: http://gerrit.cloudera.org:8080/15521
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>
---
src/kudu/fs/dir_util.cc | 2 +-
src/kudu/server/server_base.cc | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/kudu/fs/dir_util.cc b/src/kudu/fs/dir_util.cc
index 98f4e82..9b12c3b 100644
--- a/src/kudu/fs/dir_util.cc
+++ b/src/kudu/fs/dir_util.cc
@@ -118,7 +118,7 @@ Status CheckHolePunch(Env* env, const string& path) {
const Status _s_prepended = _s.CloneAndPrepend(msg); \
if (_s.IsNotFound() || _s.IsDiskFailure()) { \
health_status_ = _s_prepended; \
- LOG(INFO) << "Instance is unhealthy: " << _s_prepended.ToString(); \
+ VLOG(1) << "Directory instance has status: " << _s_prepended.ToString();
\
return Status::OK(); \
} \
return _s_prepended; \
diff --git a/src/kudu/server/server_base.cc b/src/kudu/server/server_base.cc
index 754c5a5..604486a 100644
--- a/src/kudu/server/server_base.cc
+++ b/src/kudu/server/server_base.cc
@@ -485,8 +485,7 @@ Status ServerBase::Init() {
Status s = fs_manager_->Open(&report);
// No instance files existed. Try creating a new FS layout.
if (s.IsNotFound()) {
- LOG(INFO) << "Could not load existing FS layout: " << s.ToString();
- LOG(INFO) << "Attempting to create new FS layout instead";
+ LOG(INFO) << "This appears to be a new deployment of Kudu; creating new FS layout";
is_first_run_ = true;
s = fs_manager_->CreateInitialFileSystemLayout();
if (s.IsAlreadyPresent()) {
|