You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/04/19 23:34:19 UTC

[1/2] mesos git commit: Prevent agent from crashing when the ID is too long.

Repository: mesos
Updated Branches:
  refs/heads/1.2.x d9e6daa11 -> 8d847ec01


Prevent agent from crashing when the ID is too long.

When launching a task with a very long name mkdir will fail and crash
the agent, making it quick and easy to remotely crash any agent(s).
This changes makes sure that we never exceed the default file name
limit of most of the file systems out there. If the limit is exceed a
TASK_ERROR is instead sent back to the client.

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

*** Modified for 1.2.x. ***


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

Branch: refs/heads/1.2.x
Commit: 60008141eda4c1f4a3b556040977473657c030f9
Parents: d9e6daa
Author: Aaron Wood <aa...@verizon.com>
Authored: Sun Apr 16 15:21:09 2017 +0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Apr 20 07:31:59 2017 +0800

----------------------------------------------------------------------
 src/common/validation.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/60008141/src/common/validation.cpp
----------------------------------------------------------------------
diff --git a/src/common/validation.cpp b/src/common/validation.cpp
index 0f1a022..4a2ff98 100644
--- a/src/common/validation.cpp
+++ b/src/common/validation.cpp
@@ -16,10 +16,13 @@
 
 #include "common/validation.hpp"
 
+#include <limits.h>
+
 #include <algorithm>
 #include <cctype>
 
 #include <stout/foreach.hpp>
+#include <stout/stringify.hpp>
 
 #include <stout/os/constants.hpp>
 
@@ -45,6 +48,12 @@ Option<Error> validateID(const string& id)
     return Error("ID must be non-empty");
   }
 
+  if (id.length() > NAME_MAX) {
+    return Error(
+        "ID must not be greater than " +
+        stringify(NAME_MAX) + " characters");
+  }
+
   if (std::any_of(id.begin(), id.end(), invalidCharacter)) {
     return Error("'" + id + "' contains invalid characters");
   }


[2/2] mesos git commit: Added MESOS-7346 to 1.2.1 CHANGELOG.

Posted by ji...@apache.org.
Added MESOS-7346 to 1.2.1 CHANGELOG.


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

Branch: refs/heads/1.2.x
Commit: 8d847ec010d5e24c8ad2fb5812f14a12f80e1486
Parents: 6000814
Author: Jie Yu <yu...@gmail.com>
Authored: Thu Apr 20 07:33:45 2017 +0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Apr 20 07:34:16 2017 +0800

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/8d847ec0/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 07220e0..f5c144b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,7 @@ All Issues:
   * [MESOS-7383] - Docker executor logs possibly sensitive parameters.
   * [MESOS-7350] - Failed to pull image from Nexus Registry due to signature missing.
   * [MESOS-5028] - Copy provisioner cannot replace directory with symlink.
+  * [MESOS-7346] - Agent crashes if the task name is too long.
 
 
 Release Notes - Mesos - Version 1.2.0