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
The following commit(s) were added to refs/heads/master by this push:
new c37196b [fs] KUDU-3161: Include FileSystem Path in UUID Mismatch Error
c37196b is described below
commit c37196badd1bd7dd950ef7fd49debbf8becf3cbc
Author: Abhishek Chennaka <[email protected]>
AuthorDate: Sun Jun 20 21:10:05 2021 -0400
[fs] KUDU-3161: Include FileSystem Path in UUID Mismatch Error
This patch enhances current error logging to include filesystem
path if the UUID of the instance file in any of the filesystem roots
differs from the UUID of other filesystem roots by including the
filesystem path. This helps in troubleshooting scenarios where
we need to know the exact directory to look for.
Current log:
Mismatched UUIDs across filesystem roots:
aefaaab3fe774f7f87d5a3da4ae1aaae vs. 2af886a28b784b92b64432c612597e2d;
configuring multiple Kudu processes with the same directory is not
supported
Log after the patch:
Mismatched UUIDs across filesystem roots: The path
/tserver-0/data contains UUID aefaaab3fe774f7f87d5a3da4ae1aaae vs.
the path /tserver-1/data contains UUID 2af886a28b784b92b64432c612597e2d;
configuring multiple Kudu processes with the same directory is not
supported
Change-Id: I02ccd93b8cbb2c2f17573d9d56f955ef4723481f
Reviewed-on: http://gerrit.cloudera.org:8080/17606
Reviewed-by: Bankim Bhavsar <[email protected]>
Reviewed-by: Grant Henke <[email protected]>
Tested-by: Grant Henke <[email protected]>
---
src/kudu/fs/fs_manager.cc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/kudu/fs/fs_manager.cc b/src/kudu/fs/fs_manager.cc
index 3b866f8..a628469 100644
--- a/src/kudu/fs/fs_manager.cc
+++ b/src/kudu/fs/fs_manager.cc
@@ -310,7 +310,7 @@ void FsManager::InitBlockManager() {
Status FsManager::PartialOpen(CanonicalizedRootsList* missing_roots) {
RETURN_NOT_OK(Init());
-
+ string reference_instance_path;
for (auto& root : canonicalized_all_fs_roots_) {
if (!root.status.ok()) {
continue;
@@ -334,11 +334,13 @@ Status FsManager::PartialOpen(CanonicalizedRootsList*
missing_roots) {
if (!metadata_) {
metadata_.reset(pb.release());
+ reference_instance_path = root.path;
} else if (pb->uuid() != metadata_->uuid()) {
return Status::Corruption(Substitute(
- "Mismatched UUIDs across filesystem roots: $0 vs. $1; configuring "
- "multiple Kudu processes with the same directory is not supported",
- metadata_->uuid(), pb->uuid()));
+ "Mismatched UUIDs across filesystem roots: The path $0 contains UUID
$1 vs. "
+ "the path $2 contains UUID $3; configuring multiple Kudu processes
with the same "
+ "directory is not supported",
+ reference_instance_path, metadata_->uuid() , root.path, pb->uuid()));
}
}