You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/09/07 10:01:00 UTC

[1/2] mesos git commit: Log task status updates' error messages in docker executor.

Repository: mesos
Updated Branches:
  refs/heads/master 2d379fba4 -> dee5f5ebd


Log task status updates' error messages in docker executor.


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

Branch: refs/heads/master
Commit: b89d1a0c6456ad9e45432f9f0e9956710c905641
Parents: 2d379fb
Author: Alexander Rukletsov <al...@apache.org>
Authored: Thu Sep 7 11:59:22 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Sep 7 11:59:22 2017 +0200

----------------------------------------------------------------------
 src/docker/executor.cpp | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b89d1a0c/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index 59e594d..e9949f6 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -186,6 +186,8 @@ public:
       status.set_message(
         "Failed to create docker run options: " + runOptions.error());
 
+      LOG(ERROR) << status.message();
+
       driver->sendStatusUpdate(status);
 
       _stop();
@@ -533,6 +535,8 @@ private:
       message = "Container " + WSTRINGIFY(status);
     }
 
+    LOG(INFO) << message;
+
     CHECK_SOME(taskId);
 
     // TODO(alexr): Use `protobuf::createTaskStatus()`


[2/2] mesos git commit: Excluded invalid offers from abnormal termination metrics.

Posted by al...@apache.org.
Excluded invalid offers from abnormal termination metrics.

Some example frameworks consider all TASK_LOST updates as a sign of
an abnormal termination. However, the task can fail to run due to
the offer becoming invalid, which is inherently racy and does not
mean the task has terminated abnormally.

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


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

Branch: refs/heads/master
Commit: dee5f5ebd8d0b1e995e83c7aa2ced615d11a11ab
Parents: b89d1a0
Author: Alexander Rukletsov <al...@apache.org>
Authored: Wed Sep 6 11:40:28 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Sep 7 12:00:38 2017 +0200

----------------------------------------------------------------------
 src/examples/balloon_framework.cpp    | 6 ++++--
 src/examples/disk_full_framework.cpp  | 6 +++++-
 src/examples/long_lived_framework.cpp | 6 +++++-
 3 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dee5f5eb/src/examples/balloon_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/balloon_framework.cpp b/src/examples/balloon_framework.cpp
index 1a97f56..a63dbab 100644
--- a/src/examples/balloon_framework.cpp
+++ b/src/examples/balloon_framework.cpp
@@ -299,8 +299,10 @@ public:
       case TASK_ERROR:
         taskActive = false;
 
-        ++metrics.abnormal_terminations;
-        break;
+        if (status.reason() != TaskStatus::REASON_INVALID_OFFERS) {
+          ++metrics.abnormal_terminations;
+          break;
+        }
       default:
         break;
     }

http://git-wip-us.apache.org/repos/asf/mesos/blob/dee5f5eb/src/examples/disk_full_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/disk_full_framework.cpp b/src/examples/disk_full_framework.cpp
index f9d5af5..2572c72 100644
--- a/src/examples/disk_full_framework.cpp
+++ b/src/examples/disk_full_framework.cpp
@@ -254,7 +254,11 @@ public:
       }
 
       taskActive = false;
-      ++metrics.abnormal_terminations;
+
+      if (status.reason() != TaskStatus::REASON_INVALID_OFFERS) {
+        ++metrics.abnormal_terminations;
+      }
+
       break;
     case TASK_STARTING:
     case TASK_RUNNING:

http://git-wip-us.apache.org/repos/asf/mesos/blob/dee5f5eb/src/examples/long_lived_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/long_lived_framework.cpp b/src/examples/long_lived_framework.cpp
index 3de4a02..da63204 100644
--- a/src/examples/long_lived_framework.cpp
+++ b/src/examples/long_lived_framework.cpp
@@ -325,7 +325,11 @@ protected:
         status.state() == TaskState::TASK_LOST ||
         status.state() == TaskState::TASK_FAILED ||
         status.state() == TaskState::TASK_ERROR) {
-      ++metrics.abnormal_terminations;
+      // Launch on an invalid offer should not be
+      // counted as abnormal termination.
+      if (status.reason() != TaskStatus::REASON_INVALID_OFFERS) {
+        ++metrics.abnormal_terminations;
+      }
     }
   }