You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2018/06/21 20:15:06 UTC

[1/5] mesos git commit: Added Xiang Chaosheng to the contributors list.

Repository: mesos
Updated Branches:
  refs/heads/master f0284a51d -> 0e8e5d2e9


Added Xiang Chaosheng to the contributors list.

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


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

Branch: refs/heads/master
Commit: 00e5f1b667abf15d5c5a1d32feb2669663e073e3
Parents: f0284a5
Author: xiang chaosheng <zh...@qq.com>
Authored: Wed Jun 20 16:27:07 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Jun 21 13:14:48 2018 -0700

----------------------------------------------------------------------
 docs/contributors.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/00e5f1b6/docs/contributors.yaml
----------------------------------------------------------------------
diff --git a/docs/contributors.yaml b/docs/contributors.yaml
index c46795a..0118a8e 100644
--- a/docs/contributors.yaml
+++ b/docs/contributors.yaml
@@ -803,6 +803,14 @@
   jira_user: wrouesnel
   reviewboard_user: wrouesnel
 
+- name: Xiang Chaosheng
+  affiliations:
+    - {organization: ChinaUnicom}
+  emails:
+    - xiangcs@chinaunicom.cn
+  jira_user: zhanrox
+  reviewboard_user: zhanrox
+
 - name: Xiao Deshi
   affiliations:
     - {organization: Dataman}


[5/5] mesos git commit: Added a length validation for container IDs.

Posted by gi...@apache.org.
Added a length validation for container IDs.

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


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

Branch: refs/heads/master
Commit: c545bbfa584d303956f3d8b4075680d3d4c9995e
Parents: 00e5f1b
Author: wei xiao <xw...@outlook.com>
Authored: Thu Jun 21 11:58:14 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Jun 21 13:14:49 2018 -0700

----------------------------------------------------------------------
 src/slave/constants.hpp              |  4 ++++
 src/slave/validation.cpp             |  7 +++++++
 src/tests/slave_validation_tests.cpp | 11 +++++++++++
 3 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c545bbfa/src/slave/constants.hpp
----------------------------------------------------------------------
diff --git a/src/slave/constants.hpp b/src/slave/constants.hpp
index b97daf3..0bd9f37 100644
--- a/src/slave/constants.hpp
+++ b/src/slave/constants.hpp
@@ -85,6 +85,10 @@ constexpr size_t MAX_COMPLETED_FRAMEWORKS = 50;
 // to store in memory.
 constexpr size_t DEFAULT_MAX_COMPLETED_EXECUTORS_PER_FRAMEWORK = 150;
 
+// Maximum number of a container id length, according to the
+// max entry length for directory names on AUFS.
+constexpr size_t MAX_CONTAINER_ID_LENGTH = 242;
+
 // Maximum number of completed tasks per executor to store in memory.
 //
 // NOTE: This should be greater than zero because the agent looks

http://git-wip-us.apache.org/repos/asf/mesos/blob/c545bbfa/src/slave/validation.cpp
----------------------------------------------------------------------
diff --git a/src/slave/validation.cpp b/src/slave/validation.cpp
index 09f1fc7..7b4c15a 100644
--- a/src/slave/validation.cpp
+++ b/src/slave/validation.cpp
@@ -14,6 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "slave/constants.hpp"
 #include "slave/validation.hpp"
 
 #include <string>
@@ -52,6 +53,12 @@ Option<Error> validateContainerId(const ContainerID& containerId)
 
   // Check ContainerID specific rules.
   //
+  // Valid the container id length
+  if (id.length() > MAX_CONTAINER_ID_LENGTH) {
+    return Error("'ContainerID.value' '" + id + "' exceeds the maximum"
+                 " length (" + stringify(MAX_CONTAINER_ID_LENGTH) + ")");
+  }
+
   // Periods are disallowed because our string representation of
   // ContainerID uses periods: <uuid>.<child>.<grandchild>.
   // For example: <uuid>.redis.backup

http://git-wip-us.apache.org/repos/asf/mesos/blob/c545bbfa/src/tests/slave_validation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_validation_tests.cpp b/src/tests/slave_validation_tests.cpp
index d8bc142..25019cc 100644
--- a/src/tests/slave_validation_tests.cpp
+++ b/src/tests/slave_validation_tests.cpp
@@ -93,6 +93,17 @@ TEST(AgentValidationTest, ContainerID)
   error = validation::container::validateContainerId(containerId);
   EXPECT_SOME(error);
 
+  // Valid with invalid container ID (length more than 242).
+  containerId.set_value(
+    "length243-223456789-323456789-423456789-523456789-623456789-"
+    "723456789-823456789-923456789-023456789-123456789-223456789-"
+    "323456789-423456789-523456789-623456789-723456789-823456789-"
+    "923456789-023456789-123456789-223456789-323456789-423456789-"
+    "123");
+  containerId.mutable_parent()->set_value("redis");
+  error = validation::container::validateContainerId(containerId);
+  EXPECT_SOME(error);
+
   // Valid with valid parent.
   containerId.set_value("backup");
   containerId.mutable_parent()->set_value("redis");


[4/5] mesos git commit: Improved the accuracy of a failure message in docker fetcher plugin.

Posted by gi...@apache.org.
Improved the accuracy of a failure message in docker fetcher plugin.

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


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

Branch: refs/heads/master
Commit: 0e8e5d2e9def178c6be87812d942336def312275
Parents: 84664f1
Author: he yi hua <yh...@163.com>
Authored: Thu Jun 21 12:42:36 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Jun 21 13:14:49 2018 -0700

----------------------------------------------------------------------
 src/uri/fetchers/docker.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0e8e5d2e/src/uri/fetchers/docker.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/docker.cpp b/src/uri/fetchers/docker.cpp
index a04f71d..55ca118 100644
--- a/src/uri/fetchers/docker.cpp
+++ b/src/uri/fetchers/docker.cpp
@@ -870,6 +870,11 @@ Future<http::Headers> DockerFetcherPluginProcess::getAuthHeader(
       });
   }
 
+  if (authScheme == "BASIC"){
+    return Failure(
+        "Unexpected BASIC Authorization response status: " + response.status);
+  }
+
   return Failure("Unsupported auth-scheme: " + authScheme);
 }
 


[3/5] mesos git commit: Fixed an issue where agent may fail to recover.

Posted by gi...@apache.org.
Fixed an issue where agent may fail to recover.

Fixed an issue where agent may fail to recover if the agent dies before
image store cache to the checkpoint. when images file is empty, ignore
it and continue.

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


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

Branch: refs/heads/master
Commit: 84664f11635160f8a8434421670111b54a7cfe88
Parents: 62959cf
Author: bin zheng <zh...@chinaunicom.cn>
Authored: Thu Jun 21 12:02:23 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Jun 21 13:14:49 2018 -0700

----------------------------------------------------------------------
 .../provisioner/docker/metadata_manager.cpp     |  4 +++-
 .../containerizer/provisioner_docker_tests.cpp  | 21 ++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/84664f11/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp b/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
index 98c8fc7..9abcc3d 100644
--- a/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
+++ b/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
@@ -265,7 +265,9 @@ Future<Nothing> MetadataManagerProcess::recover()
   if (images.isNone()) {
     // This could happen if the slave died after opening the file for
     // writing but before persisted on disk.
-    return Failure("Unexpected empty images file '" + storedImagesPath + "'");
+    LOG(WARNING) << "The images file '" << storedImagesPath << "' is empty";
+
+    return Nothing();
   }
 
   foreach (const Image& image, images->images()) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/84664f11/src/tests/containerizer/provisioner_docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/provisioner_docker_tests.cpp b/src/tests/containerizer/provisioner_docker_tests.cpp
index 71247c3..0b06eb7 100644
--- a/src/tests/containerizer/provisioner_docker_tests.cpp
+++ b/src/tests/containerizer/provisioner_docker_tests.cpp
@@ -240,6 +240,27 @@ TEST_F(ProvisionerDockerLocalStoreTest, MetadataManagerInitialization)
   verifyLocalDockerImage(flags, imageInfo->layers);
 }
 
+// This is a regression test for MESOS-8871.
+// This test the ability of the metadata manger to ignore the empty images
+// file when it recover images.
+TEST_F(ProvisionerDockerLocalStoreTest,
+       MetadataManagerRecoveryWithEmptyImagesFile)
+{
+  slave::Flags flags;
+  flags.docker_registry = path::join(os::getcwd(), "images");
+  flags.docker_store_dir = path::join(os::getcwd(), "store");
+  flags.image_provisioner_backend = COPY_BACKEND;
+  const string emptyImages = paths::getStoredImagesPath(flags.docker_store_dir);
+
+  ASSERT_SOME(os::mkdir(flags.docker_store_dir));
+  ASSERT_SOME(os::touch(emptyImages));
+
+  Try<Owned<slave::Store>> store = slave::docker::Store::create(flags);
+  ASSERT_SOME(store);
+
+  Future<Nothing> recover = store.get()->recover();
+  AWAIT_READY(recover);
+}
 
 // This test verifies that the layer that is missing from the store
 // will be pulled.


[2/5] mesos git commit: Added DaoTan Cui to the contributors list.

Posted by gi...@apache.org.
Added DaoTan Cui to the contributors list.

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


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

Branch: refs/heads/master
Commit: 62959cf4e40d309e807ff0ecce921fa10cbcf33b
Parents: c545bbf
Author: cui dt <cu...@outlook.com>
Authored: Thu Jun 21 11:58:31 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Jun 21 13:14:49 2018 -0700

----------------------------------------------------------------------
 docs/contributors.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/62959cf4/docs/contributors.yaml
----------------------------------------------------------------------
diff --git a/docs/contributors.yaml b/docs/contributors.yaml
old mode 100644
new mode 100755
index 0118a8e..7c54091
--- a/docs/contributors.yaml
+++ b/docs/contributors.yaml
@@ -257,6 +257,14 @@
   jira_user: dpravat
   reviewboard_user: dpravat
 
+- name: DaoTan Cui
+   affiliations:
+    - {organization: Asiainfo}
+   emails:
+    - cuidt@outlook.com
+   jira_user: cuidt
+   reviewboard_user: dtcui
+
 - name: Dario Rexin
   affiliations:
     - {organization: Apple}