You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/01/09 20:19:11 UTC
[9/9] mesos git commit: Cleaned up master logging code slightly.
Cleaned up master logging code slightly.
Review: https://reviews.apache.org/r/55354/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/51b66f5b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/51b66f5b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/51b66f5b
Branch: refs/heads/master
Commit: 51b66f5b691387bd29ac4c515af15ab94557742b
Parents: 03f16d2
Author: Neil Conway <ne...@gmail.com>
Authored: Mon Jan 9 12:18:45 2017 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Jan 9 12:18:45 2017 -0800
----------------------------------------------------------------------
src/master/master.cpp | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/51b66f5b/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 7208b0e..0c2210b 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -6106,8 +6106,7 @@ void Master::_markUnreachable(
slaves.markingUnreachable.erase(slave->info.id());
if (registrarResult.isFailed()) {
- LOG(FATAL) << "Failed to mark agent " << slave->info.id()
- << " (" << slave->info.hostname() << ")"
+ LOG(FATAL) << "Failed to mark agent " << *slave
<< " unreachable in the registry: "
<< registrarResult.failure();
}
@@ -6117,9 +6116,7 @@ void Master::_markUnreachable(
// `MarkSlaveUnreachable` registry operation should never fail.
CHECK(registrarResult.get());
- LOG(INFO) << "Marked agent " << slave->info.id() << " ("
- << slave->info.hostname() << ") unreachable: "
- << message;
+ LOG(INFO) << "Marked agent " << *slave << " unreachable: " << message;
++metrics->slave_removals;
++metrics->slave_removals_reason_unhealthy;
@@ -7769,19 +7766,17 @@ void Master::_removeSlave(
CHECK(!registrarResult.isDiscarded());
if (registrarResult.isFailed()) {
- LOG(FATAL) << "Failed to remove agent " << slave->info.id()
- << " (" << slave->info.hostname() << ")"
+ LOG(FATAL) << "Failed to remove agent " << *slave
<< " from the registrar: " << registrarResult.failure();
}
// Should not happen: the master will only try to remove agents that
// are currently admitted.
CHECK(registrarResult.get())
- << "Agent " << slave->info.id() << " (" << slave->info.hostname() << ") "
+ << "Agent " << *slave
<< "already removed from the registrar";
- LOG(INFO) << "Removed agent " << slave->info.id() << " ("
- << slave->info.hostname() << "): " << removalCause;
+ LOG(INFO) << "Removed agent " << *slave << ": " << removalCause;
++metrics->slave_removals;
if (reason.isSome()) {
@@ -8586,7 +8581,7 @@ void Slave::addTask(Task* task)
LOG(INFO) << "Adding task " << taskId
<< " with resources " << task->resources()
- << " on agent " << id << " (" << info.hostname() << ")";
+ << " on agent " << *this;
}