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 2014/02/07 03:07:33 UTC
git commit: Fixed a bug that causes incorrect log output when there
is no master detected.
Updated Branches:
refs/heads/master bbc348fe8 -> cf56aa1ba
Fixed a bug that causes incorrect log output when there is no master
detected.
Review: https://reviews.apache.org/r/17338
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cf56aa1b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cf56aa1b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cf56aa1b
Branch: refs/heads/master
Commit: cf56aa1baf333d72ef1aba6d297d9558e536feae
Parents: bbc348f
Author: Jiang Yan Xu <ya...@jxu.me>
Authored: Thu Feb 6 17:40:45 2014 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Feb 6 17:58:27 2014 -0800
----------------------------------------------------------------------
src/master/master.cpp | 3 ++-
src/slave/slave.cpp | 12 ++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/cf56aa1b/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 77872ec..241b006 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -33,6 +33,7 @@
#include <stout/nothing.hpp>
#include <stout/os.hpp>
#include <stout/path.hpp>
+#include <stout/stringify.hpp>
#include <stout/utils.hpp>
#include <stout/uuid.hpp>
@@ -732,7 +733,7 @@ void Master::detected(const Future<Option<UPID> >& _leader)
leader = _leader.get();
LOG(INFO) << "The newly elected leader is "
- << (leader.isSome() ? leader.get() : "None");
+ << (leader.isSome() ? stringify(leader.get()) : "None");
if (wasElected && !elected()) {
EXIT(1) << "Lost leadership... committing suicide!";
http://git-wip-us.apache.org/repos/asf/mesos/blob/cf56aa1b/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index a97b1d5..1c0502e 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -432,7 +432,7 @@ void Slave::shutdown(const UPID& from)
if (from && master != from) {
LOG(WARNING) << "Ignoring shutdown message from " << from
<< " because it is not from the registered master: "
- << (master.isSome() ? master.get() : "None");
+ << (master.isSome() ? stringify(master.get()) : "None");
return;
}
@@ -534,7 +534,7 @@ void Slave::registered(const UPID& from, const SlaveID& slaveId)
if (master != from) {
LOG(WARNING) << "Ignoring registration message from " << from
<< " because it is not the expected master: "
- << (master.isSome() ? master.get() : "None");
+ << (master.isSome() ? stringify(master.get()) : "None");
return;
}
@@ -584,7 +584,7 @@ void Slave::reregistered(const UPID& from, const SlaveID& slaveId)
if (master != from) {
LOG(WARNING) << "Ignoring re-registration message from " << from
<< " because it is not the expected master: "
- << (master.isSome() ? master.get() : "None");
+ << (master.isSome() ? stringify(master.get()) : "None");
return;
}
@@ -722,7 +722,7 @@ void Slave::runTask(
if (master != from) {
LOG(WARNING) << "Ignoring run task message from " << from
<< " because it is not the expected master: "
- << (master.isSome() ? master.get() : "None");
+ << (master.isSome() ? stringify(master.get()) : "None");
return;
}
@@ -999,7 +999,7 @@ void Slave::killTask(
if (master != from) {
LOG(WARNING) << "Ignoring kill task message from " << from
<< " because it is not the expected master: "
- << (master.isSome() ? master.get() : "None");
+ << (master.isSome() ? stringify(master.get()) : "None");
return;
}
@@ -1128,7 +1128,7 @@ void Slave::shutdownFramework(
LOG(WARNING) << "Ignoring shutdown framework message for " << frameworkId
<< " from " << from
<< " because it is not from the registered master ("
- << (master.isSome() ? master.get() : "None") << ")";
+ << (master.isSome() ? stringify(master.get()) : "None") << ")";
return;
}