mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Song <songzihao1...@gmail.com>
Subject Re: Review Request 58747: Fixed docker uri fetcher strict v2 schema 1 check.
Date Wed, 26 Apr 2017 22:30:49 GMT


> On April 26, 2017, 1:01 p.m., Ilya Pronin wrote:
> > We can check if we got a schema 1 manifest by parsing manifest JSON first and checking
`schemaVersion` field in it as I did here: https://reviews.apache.org/r/53850/diff/1#0 Otherwise
we may get a cryptic error message saying that some fields are missing. What do you think?
> 
> Jie Yu wrote:
>     Also related to https://reviews.apache.org/r/58725
>     
>     Maybe we should just land Ilya's scheme 2 support? Gilbert, thouughts?

Thank you guys.

I think they are separate issues. There is a bug in the check after reading the docker spec
doc:
In https://docs.docker.com/registry/spec/manifest-v2-1/:
```
Manifest Type	Media Type
manifest	“application/vnd.docker.distribution.manifest.v1+json”
signed manifest	“application/vnd.docker.distribution.manifest.v1+prettyjws”
Note that “application/json” will also be accepted for schema 1.
```

The check introduced in r/53848 does not capture the `Note` that `“application/json” will
also be accepted for schema 1`. This supposes to be the backward compactible note for old
registries < 2.3.

I would +1 to land Ilya's schema 2 support, but it may not catch up with 1.3 release. Should
we land this quick fix first then land the schema 2 support?


- Gilbert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58747/#review173085
-----------------------------------------------------------


On April 26, 2017, 12:14 p.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58747/
> -----------------------------------------------------------
> 
> (Updated April 26, 2017, 12:14 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Ilya Pronin, and Jie Yu.
> 
> 
> Bugs: MESOS-7272
>     https://issues.apache.org/jira/browse/MESOS-7272
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This check was introduced from this patch:
> https://reviews.apache.org/r/53848/
> 
> The check on registry v2 schema 1 is too strict. 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".
> No schema information is included in the manifest header for old
> registries.
> 
> 
> Diffs
> -----
> 
>   src/uri/fetchers/docker.cpp 1c6ab929deacfc29aa6b4f1df04c2b9782044a90 
> 
> 
> Diff: https://reviews.apache.org/r/58747/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message