You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2015/11/07 20:02:09 UTC
mesos git commit: Fixed Slave::shutdown logging.
Repository: mesos
Updated Branches:
refs/heads/master 1d178c2d1 -> a20f9e9e8
Fixed Slave::shutdown logging.
Checks message.empty() in Slave::shutdown before logging it.
Review: https://reviews.apache.org/r/39507
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a20f9e9e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a20f9e9e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a20f9e9e
Branch: refs/heads/master
Commit: a20f9e9e8483b49db5045c0e1f00660c75654cc3
Parents: 1d178c2
Author: Guangya Liu <gy...@gmail.com>
Authored: Sat Nov 7 19:46:16 2015 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Sat Nov 7 19:46:17 2015 +0100
----------------------------------------------------------------------
src/slave/slave.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a20f9e9e/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 0f9ed82..535adc3 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -643,13 +643,21 @@ void Slave::shutdown(const UPID& from, const string& message)
LOG(INFO) << "Slave asked to shut down by " << from
<< (message.empty() ? "" : " because '" + message + "'");
} else if (info.has_id()) {
- LOG(INFO) << message << "; unregistering and shutting down";
+ if (message.empty()) {
+ LOG(INFO) << "Unregistering and shutting down";
+ } else {
+ LOG(INFO) << message << "; unregistering and shutting down";
+ }
UnregisterSlaveMessage message_;
message_.mutable_slave_id()->MergeFrom(info.id());
send(master.get(), message_);
} else {
- LOG(INFO) << message << "; shutting down";
+ if (message.empty()) {
+ LOG(INFO) << "Shutting down";
+ } else {
+ LOG(INFO) << message << "; shutting down";
+ }
}
state = TERMINATING;