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/05/05 22:06:19 UTC

[1/3] mesos git commit: Concatenation for HTTP Headers.

Repository: mesos
Updated Branches:
  refs/heads/1.2.x 1eb8871c2 -> 854712fbd


Concatenation for HTTP Headers.

Added http::Headers::operator+().

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


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

Branch: refs/heads/1.2.x
Commit: e0c08799ef738ccb637115dff24958afeb4cbe1b
Parents: 1eb8871
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Wed Apr 26 14:15:38 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri May 5 15:04:02 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/http.hpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e0c08799/3rdparty/libprocess/include/process/http.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/http.hpp b/3rdparty/libprocess/include/process/http.hpp
index eb2c87d..93c2c4a 100644
--- a/3rdparty/libprocess/include/process/http.hpp
+++ b/3rdparty/libprocess/include/process/http.hpp
@@ -503,6 +503,13 @@ public:
         CaseInsensitiveHash,
         CaseInsensitiveEqual>::get(key);
   }
+
+  Headers operator+(const Headers& that) const
+  {
+    Headers result = *this;
+    result.insert(that.begin(), that.end());
+    return result;
+  }
 };
 
 


[2/3] mesos git commit: Fetching docker image manifests with 'Accept' header.

Posted by ji...@apache.org.
Fetching docker image manifests with 'Accept' header.

Added 'Accept: application/vnd.docker.distribution.manifest.v1+json'
to the headers of HTTP requests for fetching manifests from any Docker
registry. Some registry services (e.g., Amazon ECR) check the 'Accept'
field strictly and reject the requests if it is not specified.

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


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

Branch: refs/heads/1.2.x
Commit: 90fe5fa27b4f6e1ba463ae73982f569a25a12ee5
Parents: e0c0879
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Fri May 5 14:55:33 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri May 5 15:04:03 2017 -0700

----------------------------------------------------------------------
 src/uri/fetchers/docker.cpp | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/90fe5fa2/src/uri/fetchers/docker.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/docker.cpp b/src/uri/fetchers/docker.cpp
index 35e9afa..a13e6f1 100644
--- a/src/uri/fetchers/docker.cpp
+++ b/src/uri/fetchers/docker.cpp
@@ -328,6 +328,7 @@ private:
       const URI& uri,
       const string& directory,
       const URI& manifestUri,
+      const http::Headers& manifestHeaders,
       const http::Response& response);
 
   Future<Nothing> __fetch(
@@ -468,12 +469,22 @@ Future<Nothing> DockerFetcherPluginProcess::fetch(
 
   URI manifestUri = getManifestUri(uri);
 
-  return curl(manifestUri)
+  // Request a Version 2 Schema 1 manifest. The MIME type of a Schema 1
+  // manifest is described in the following link:
+  // https://docs.docker.com/registry/spec/manifest-v2-1/
+  // Note: The 'Accept' header is required for Amazon ECR. See:
+  // https://forums.aws.amazon.com/message.jspa?messageID=780440
+  http::Headers manifestHeaders = {
+    {"Accept", "application/vnd.docker.distribution.manifest.v1+json"}
+  };
+
+  return curl(manifestUri, manifestHeaders)
     .then(defer(self(),
                 &Self::_fetch,
                 uri,
                 directory,
                 manifestUri,
+                manifestHeaders,
                 lambda::_1));
 }
 
@@ -482,13 +493,14 @@ Future<Nothing> DockerFetcherPluginProcess::_fetch(
     const URI& uri,
     const string& directory,
     const URI& manifestUri,
+    const http::Headers& manifestHeaders,
     const http::Response& response)
 {
   if (response.code == http::Status::UNAUTHORIZED) {
     return getAuthHeader(manifestUri, response)
       .then(defer(self(), [=](
           const http::Headers& authHeaders) -> Future<Nothing> {
-        return curl(manifestUri, authHeaders)
+        return curl(manifestUri, manifestHeaders + authHeaders)
           .then(defer(self(),
                       &Self::__fetch,
                       uri,


[3/3] mesos git commit: Added MESOS-7427 to the 1.2.1 CHANGELOG.

Posted by ji...@apache.org.
Added MESOS-7427 to the 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/854712fb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/854712fb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/854712fb

Branch: refs/heads/1.2.x
Commit: 854712fbd709e8e743efaafaa087407382e75188
Parents: 90fe5fa
Author: Jie Yu <yu...@gmail.com>
Authored: Fri May 5 15:05:57 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri May 5 15:06:14 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/854712fb/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 222ba8f..1b53ee0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -21,6 +21,7 @@ All Issues:
   * [MESOS-7350] - Failed to pull image from Nexus Registry due to signature missing.
   * [MESOS-7346] - Agent crashes if the task name is too long.
   * [MESOS-7400] - The mesos crashes due to an incorrect invariant check in the decoder.
+  * [MESOS-7427] - Registry puller cannot fetch manifests from Amazon ECR: 405 Unsupported.
   * [MESOS-7453] - glyphicons-halflings-regular.woff2 is missing in WebUI.