> 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?
> 
> Guangya Liu wrote:
>     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();
>     }
> 
> Gilbert Song wrote:
>     How about:
>     
>     ```
>     if (!storedImages.contains(imageReference)) {
>       return None();
>     }
>     
>     if (forcePullImage) {
>       VLOG(1) << "The mesos containerizer is trying to force pull image '"
>               << imageReference << "' from registry";
>               
>       return None();
>     }
>     ```

Good! ;-)


- Guangya


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


On 五月 13, 2016, 3:26 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44838/
> -----------------------------------------------------------
> 
> (Updated 五月 13, 2016, 3:26 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
> 
>

Reply via email to