mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhq527...@gmail.com>
Subject Re: Review Request 70288: Supported docker manifest v2 schema2.
Date Tue, 02 Apr 2019 13:18:00 GMT

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




src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
Lines 100 (patched)
<https://reviews.apache.org/r/70288/#comment300472>

    s/blobSums/digests/ to make it consistent with the implementation of this method.



src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
Lines 548 (patched)
<https://reviews.apache.org/r/70288/#comment300479>

    Can we use `layerIds` in this for loop instead of `digests`? If so, then we do not need
the `if (digest == manifest.config().digest())` check below (since `layerIds` does not contain
config digest) and we actually do not need this `digests` parameter for this `____pull` method.



src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
Lines 559-560 (patched)
<https://reviews.apache.org/r/70288/#comment300475>

    We can merge these two line into a single line.



src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
Lines 642-643 (patched)
<https://reviews.apache.org/r/70288/#comment300478>

    I would suggest:
    ```
        VLOG(1) << "Fetching layer '" << digest 
                << "' for image '" << reference << "'";
    ```



src/slave/containerizer/mesos/provisioner/docker/store.cpp
Lines 329 (patched)
<https://reviews.apache.org/r/70288/#comment300480>

    If we change the field name from `config_path` to `config_id` as I mentioned in https://reviews.apache.org/r/70365
, then I think here we need to change
    `!os::exists(image->config_path())` to `!os::exists(paths::getImageLayerPath(storeDir,
image->config_path())`.



src/slave/containerizer/mesos/provisioner/docker/store.cpp
Lines 458 (patched)
<https://reviews.apache.org/r/70288/#comment300482>

    Again if we change the field name from `config_path` to `config_id`, then here we do not
need this `_image` variable, we can just return `image`.



src/uri/fetchers/docker.cpp
Lines 685-686 (original), 677-678 (patched)
<https://reviews.apache.org/r/70288/#comment300483>

    I do not understand `"because some registries (e.g., quay.io) only support one schema
type"`, actually `quay.io` will always return `v1+prettyjws` no matter what media type is
specified in the header.
    
    I think here we need to mention that the reason we need `v2+json` in the header is if
registries drop the s1 support in future, UCR can still pull images with s2 manifest.



src/uri/fetchers/docker.cpp
Line 842 (original), 742 (patched)
<https://reviews.apache.org/r/70288/#comment300484>

    Is it possible that there is no `Content-Type`? Should we treat no `Content-Type` as v2
s1 by default



src/uri/fetchers/docker.cpp
Lines 747 (patched)
<https://reviews.apache.org/r/70288/#comment300485>

    I think it is five (including both s1 and s2) rather than three.



src/uri/fetchers/docker.cpp
Lines 832-835 (patched)
<https://reviews.apache.org/r/70288/#comment300489>

    I think we also need to add config's digest into `digests` since it is also part of fetching
blobs.


- Qian Zhang


On April 2, 2019, 4:11 p.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70288/
> -----------------------------------------------------------
> 
> (Updated April 2, 2019, 4:11 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik, Ilya Pronin, Jie Yu, and Qian Zhang.
> 
> 
> Bugs: MESOS-6934
>     https://issues.apache.org/jira/browse/MESOS-6934
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Supported docker manifest v2 schema2.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp a5683e3fe15dd35596122fcc0c580ae9d3adf7f2

>   src/slave/containerizer/mesos/provisioner/docker/store.cpp 60507aa1b7951666ed758d1b3800eddd67ba7be6

>   src/uri/fetchers/docker.cpp a87d7f086378539e6c8048e935389919a1164fbc 
> 
> 
> Diff: https://reviews.apache.org/r/70288/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>


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