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




src/slave/containerizer/mesos/isolators/volume/utils.hpp
Lines 39-69 (patched)
<https://reviews.apache.org/r/65900/#comment285233>

    @jieyu: If you really think we should get rid of `containerConfig` from 
`getAbsoluteMountPoint`, we can do things this way:
    
    ```
    inline Try<std::string> getAbsolutePathForMountPoint(
        const std::string& mountPoint,
        const Option<std::string>& rootfs,
        const std::string& containerSandboxPath,
        const std::string& hostSandboxPath)
    {
      if (path::absolute(mountPoint)) {
        if (rootfs.isSome()) {
          return path::join(rootfs.get(), mountPoint);
        }
    
        if (!os::exists(mountPoint)) {
          return Error(
              "Mount point '" + mountPoint + "' is an absolute path. "
              "It must exist if the container shares the host filesystem");
        }
        return mountPoint;
      }
    
      if (rootfs.isSome()) {
        return path::join(rootfs.get(), containerSandboxPath, mountPoint);
      }
    
      return path::join(hostSandboxPath, mountPoint);
    }
    ```


- Jason Lai


On May 8, 2018, 7:07 p.m., Jason Lai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65900/
> -----------------------------------------------------------
> 
> (Updated May 8, 2018, 7:07 p.m.)
> 
> 
> Review request for mesos, Anish Gupta, Eric Chung, Gilbert Song, Jie Yu, 
> James Peach, and Zhitao Li.
> 
> 
> Bugs: MESOS-8257
>     https://issues.apache.org/jira/browse/MESOS-8257
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Defer creation of volume target paths to container launch.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am a2ba1e6de0868c7a4fe58304ec479dce039bc288 
>   src/slave/containerizer/mesos/isolators/volume/host_path.cpp 
> 9127cf4a9d8aa2b16bb5b9903103f1f76a1e2b1a 
>   src/slave/containerizer/mesos/isolators/volume/image.cpp 
> 8ca3d55d5792ed1cfc8e49df40587ac2abc83fec 
>   src/slave/containerizer/mesos/isolators/volume/utils.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/65900/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jason Lai
> 
>

Reply via email to