mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 58408: Overwriting Directories with Files in Copy Provisioner.
Date Mon, 17 Apr 2017 00:03:46 GMT

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




src/slave/containerizer/mesos/provisioner/backends/copy.cpp
Lines 165 (patched)
<https://reviews.apache.org/r/58408/#comment245117>

    Let's use `Option<string> removePath` here, instead of relying on removePath being
an empty string. We always prefer more explicit check.



src/slave/containerizer/mesos/provisioner/backends/copy.cpp
Line 166 (original), 177 (patched)
<https://reviews.apache.org/r/58408/#comment245119>

    Not yours, but I think `Path(whiteout)` is not necessary. We should just use `whiteout.dirname()`



src/slave/containerizer/mesos/provisioner/backends/copy.cpp
Lines 193 (patched)
<https://reviews.apache.org/r/58408/#comment245131>

    What if `node->fts_info` is things like `FTS_DNR`, `FTS_ERR`, `FTS_NS`, etc. Do we
accidentally remove directories?
    
    I think we should explicitly check all fts_info type. I also think that we should return
Failure if we encounter error conditions like FTS_ERR, FTS_NDR. (This is not your fault, ths
original code does not handle that).


- Jie Yu


On April 14, 2017, 6:51 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58408/
> -----------------------------------------------------------
> 
> (Updated April 14, 2017, 6:51 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Jie Yu, and Vinod Kone.
> 
> 
> Bugs: MESOS-5028
>     https://issues.apache.org/jira/browse/MESOS-5028
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When a layer overwrites a directory with a regular file or symbolic link
> (or vice versa), the old dir/file need to be removed before copying the
> layer into the rootfs. This is processed together with whiteout:
> The copy provisioner find all files to remove, including files
> marked as whiteout and the files described above, and remove them
> before the copy process.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/provisioner/backends/copy.cpp 584cc6524f81cc1bc231b105507dbfe51fec991d

> 
> 
> Diff: https://reviews.apache.org/r/58408/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> Manually tested on the following images:
>   https://hub.docker.com/r/gilbertsong/whiteout/
>   https://hub.docker.com/r/chhsiao/overwrite/
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


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