[
https://issues.apache.org/jira/browse/MESOS-7272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985844#comment-15985844
]
Jie Yu commented on MESOS-7272:
-------------------------------
commit dce71bf3776ac648e6a1b5492093f5003ad3b694
Author: Gilbert Song <[email protected]>
Date: Wed Apr 26 18:25:08 2017 -0700
Fixed docker uri fetcher strict v2 schema 1 check.
This check was introduced from this patch:
https://reviews.apache.org/r/53848/
The check on registry v2 schema 1 is incorrect. It does not work
for registries that are older version < 2.3, because the ContentType
header may be something like this "application/json; charset=utf-8".
The check missed a note from docker registry spec that
"application/json" will also be accepted for schema 1.
Depending on the docker registry spec doc, docker support the
following three media type for V2 schema 1 manifest:
1. application/vnd.docker.distribution.manifest.v1+json
2. application/vnd.docker.distribution.manifest.v1+prettyjws
3. application/json
For more details, see:
https://docs.docker.com/registry/spec/manifest-v2-1/
Review: https://reviews.apache.org/r/58747/
> Unified containerizer does not support docker registry version < 2.3.
> ---------------------------------------------------------------------
>
> Key: MESOS-7272
> URL: https://issues.apache.org/jira/browse/MESOS-7272
> Project: Mesos
> Issue Type: Bug
> Components: containerization, docker
> Affects Versions: 1.0.2, 1.1.1, 1.2.0
> Reporter: depay
> Assignee: Gilbert Song
> Priority: Blocker
> Labels: easyfix
>
> in file `src/uri/fetchers/docker.cpp`
> ```
> Option<string> contentType = response.headers.get("Content-Type");
> if (contentType.isSome() &&
> !strings::startsWith(
> contentType.get(),
> "application/vnd.docker.distribution.manifest.v1")) {
> return Failure(
> "Unsupported manifest MIME type: " + contentType.get());
> }
> ```
> Docker fetcher check the contentType strictly, while docker registry with
> version < 2.3 returns manifests with contentType `application/json`, that
> leading failure like `E0321 13:27:27.572402 40370 slave.cpp:4650] Container
> 'xxx' for executor 'xxx' of framework xxx failed to start: Unsupported
> manifest MIME type: application/json; charset=utf-8`.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)