mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guangya Liu <gyliu...@gmail.com>
Subject Re: Review Request 44838: Enabled mesos containerizer force_pull_image for docker.
Date Fri, 13 May 2016 02:22:36 GMT


> On 五月 12, 2016, 10:34 p.m., Gilbert Song wrote:
> > src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp, lines 169-176
> > <https://reviews.apache.org/r/44838/diff/3/?file=1347999#file1347999line169>
> >
> >     btw, I would prefer check forcepulling after storedImages.contains, which may
be more logical.

I discussed this with @haosdent, if we put `forcePullImage` first, then we don't need search
storedImages if forcePullImage is true.


> On 五月 12, 2016, 10:34 p.m., Gilbert Song wrote:
> > src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp, line 174
> > <https://reviews.apache.org/r/44838/diff/3/?file=1347999#file1347999line174>
> >
> >     since you already have the check above, why dont you return None() there to
avoid checking `forcepull` again?

if (forcePullImage) {
  VLOG(1) << "The mesos containerizer is trying to force pull image '"
          << imageReference << "' from registry";
}
//The above check is mainly for logging.

if (forcePullImage || !storedImages.contains(imageReference)) {
  return None();
}


- Guangya


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


On 四月 18, 2016, 8:31 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44838/
> -----------------------------------------------------------
> 
> (Updated 四月 18, 2016, 8:31 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, haosdent huang, and Jie Yu.
> 
> 
> Bugs: MESOS-4886
>     https://issues.apache.org/jira/browse/MESOS-4886
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled mesos containerizer force_pull_image for docker.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/provisioner/docker/metadata_manager.hpp 137af502a66e6a65773c00eaacbe392576376284

>   src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp cf630cc0b67a325529fa04ad2b1708e013b9596a

>   src/slave/containerizer/mesos/provisioner/docker/store.cpp eeec94326a4fd67675df10e0b6a32267e555fa96

> 
> Diff: https://reviews.apache.org/r/44838/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> It is difficult to test this with unit test, but just test with mesos execute by setting
`force_pull_image` as true and found that the iamge was always pulled when `force_pull_image`
is true.
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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