You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/06/14 23:27:09 UTC

git commit: Fixed a bug in the Slave's logging. Added logging for failed detection of system resources in the slave.

Updated Branches:
  refs/heads/master a66f419a6 -> 038629537


Fixed a bug in the Slave's logging.
Added logging for failed detection of system resources in the slave.

Review: https://reviews.apache.org/r/11885


Project: http://git-wip-us.apache.org/repos/asf/incubator-mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mesos/commit/03862953
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mesos/tree/03862953
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mesos/diff/03862953

Branch: refs/heads/master
Commit: 038629537cce6fd6d37b46864d3c4f1de5178faa
Parents: a66f419
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Fri Jun 14 14:13:53 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Fri Jun 14 14:25:39 2013 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/03862953/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index fd96de9..952bd14 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -119,8 +119,9 @@ Slave::Slave(const slave::Flags& _flags,
   } else {
     Try<long> cpus_ = os::cpus();
     if (!cpus_.isSome()) {
-      LOG(WARNING) << "Failed to auto-detect the number of cpus to use,"
-                   << " defaulting to " << DEFAULT_CPUS;
+      LOG(WARNING) << "Failed to auto-detect the number of cpus to use: '"
+                   << cpus_.error()
+                   << "' ; defaulting to " << DEFAULT_CPUS;
       cpus = DEFAULT_CPUS;
     } else {
       cpus = cpus_.get();
@@ -133,8 +134,9 @@ Slave::Slave(const slave::Flags& _flags,
   } else {
     Try<Bytes> mem_ = os::memory();
     if (!mem_.isSome()) {
-      LOG(WARNING) << "Failed to auto-detect the size of main memory,"
-                   << " defaulting to " << DEFAULT_MEM;
+      LOG(WARNING) << "Failed to auto-detect the size of main memory: '"
+                   << mem_.error()
+                   << "' ; defaulting to " << DEFAULT_MEM;
       mem = DEFAULT_MEM;
     } else {
       mem = mem_.get();
@@ -156,8 +158,9 @@ Slave::Slave(const slave::Flags& _flags,
     // which the slave work directory is mounted.
     Try<Bytes> disk_ = fs::available(flags.work_dir);
     if (!disk_.isSome()) {
-      LOG(WARNING) << "Failed to auto-detect the free disk space,"
-                   << " defaulting to " << DEFAULT_DISK;
+      LOG(WARNING) << "Failed to auto-detect the free disk space: '"
+                   << disk_.error()
+                   << "' ; defaulting to " << DEFAULT_DISK;
       disk = DEFAULT_DISK;
     } else {
       disk = disk_.get();
@@ -2027,7 +2030,7 @@ void _watch(
   if (!watch.isReady()) {
     LOG(ERROR) << "Failed to watch executor " << executorId
                << " of framework " << frameworkId
-               << ": " << watch.isFailed() ? watch.failure() : "discarded";
+               << ": " << (watch.isFailed() ? watch.failure() : "discarded");
   }
 }