You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2019/04/11 00:54:19 UTC

[mesos] branch master updated (277d38d -> 7ea8eb6)

This is an automated email from the ASF dual-hosted git repository.

josephwu pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 277d38d  Updated documentation of default executor.
     new 7d99c72  Special cased HEARTBEAT call handling in agent.
     new 7ea8eb6  Added MESOS-9727 to the 1.8.0 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG                 | 1 +
 src/executor/executor.cpp | 3 +++
 src/slave/http.cpp        | 9 ++++++++-
 3 files changed, 12 insertions(+), 1 deletion(-)


[mesos] 02/02: Added MESOS-9727 to the 1.8.0 CHANGELOG.

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

josephwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 7ea8eb6012e0695bc59c568401cd8c008bc2b578
Author: Joseph Wu <jo...@apache.org>
AuthorDate: Wed Apr 10 17:51:21 2019 -0700

    Added MESOS-9727 to the 1.8.0 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 2cce5cf..13b72a2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -194,6 +194,7 @@ All Resolved Issues:
   * [MESOS-9696] - Test MasterQuotaTest.AvailableResourcesSingleDisconnectedAgent is flaky
   * [MESOS-9707] - Calling link::lo() may cause runtime error
   * [MESOS-9667] - Check failure when executor for task using resource provider resources subscribes before agent is registered.
+  * [MESOS-9727] - Heartbeat calls from executor to agent are reported as errors.
 
 ** Epic
   * [MESOS-8054] - Feedback for operations


[mesos] 01/02: Special cased HEARTBEAT call handling in agent.

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

josephwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 7d99c721fbd4fa546b24ee81dfc9c711a5c824ba
Author: Joseph Wu <jo...@apache.org>
AuthorDate: Wed Apr 10 16:39:08 2019 -0700

    Special cased HEARTBEAT call handling in agent.
    
    This silences a '400 Bad Request' response by the agent whenever an
    executor sends a HEARTBEAT call.  These HEARTBEATs do not include a
    valid value for required fields (FrameworkID and ExecutorID) because
    they are not known by the library generating the HEARTBEATs.
    
    The error is harmless because HEARTBEAT calls do not have any effect
    besides generating traffic.
    
    Review: https://reviews.apache.org/r/70450
---
 src/executor/executor.cpp | 3 +++
 src/slave/http.cpp        | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/executor/executor.cpp b/src/executor/executor.cpp
index e9439da..664a2f1 100644
--- a/src/executor/executor.cpp
+++ b/src/executor/executor.cpp
@@ -792,6 +792,9 @@ protected:
     if (connections.isSome()) {
       Call call;
       call.set_type(Call::HEARTBEAT);
+
+      // TODO(josephw): Consider exposing the actual values to the executor
+      // library and inserting them below.
       call.mutable_executor_id()->set_value("unused");
       call.mutable_framework_id()->set_value("unused");
 
diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index d66ae52..2c4e792 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -789,6 +789,12 @@ Future<Response> Http::executor(
           string("Expecting 'Accept' to allow ") +
           "'" + APPLICATION_PROTOBUF + "' or '" + APPLICATION_JSON + "'");
     }
+  } else if (call.type() == executor::Call::HEARTBEAT) {
+    // We return early here before doing any validation because currently
+    // this proto may contain dummy values for framework and executor IDs
+    // (which is safe).
+    // See: TODO inside `heartbeat()` in src/executor/executor.cpp.
+    return Accepted();
   } else {
     if (slave->state == Slave::RECOVERING) {
       return ServiceUnavailable("Agent has not finished recovery");
@@ -864,7 +870,8 @@ Future<Response> Http::executor(
     }
 
     case executor::Call::HEARTBEAT: {
-      return Accepted();
+      // This should be handled before hitting this switch statement.
+      UNREACHABLE();
     }
 
     case executor::Call::UNKNOWN: {