Re: Review Request 43167: Added working dir flag to mesos containerizer launch.

2016-02-04 Thread Jie Yu

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




src/slave/containerizer/mesos/launch.cpp (line 56)


The sandbox for the executor.



src/slave/containerizer/mesos/launch.cpp (lines 61 - 62)


The working directory for the executor. If will be ignored if container 
root filesystem is not specified.



src/slave/containerizer/mesos/launch.cpp (lines 258 - 283)


I would combine the logics here so that we don't end up with two chdir in 
some cases.
```
// Determine the current working directory for the executor.
string cwd;
if (flags.rootfs.isSome() && flags.working_directory.isSome()) {
  cwd = flags.working_directory.get();
} else {
  cwd = flags.sandbox.get();
}

Try chdir = os::chdir(cwd);
if (chdir.isError()) {
  ...
}

```



src/slave/containerizer/mesos/launch.cpp (lines 276 - 281)


Let's put this warning to Mesos containerizer.


- Jie Yu


On Feb. 4, 2016, 12:35 a.m., Gilbert Song wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43167/
> ---
> 
> (Updated Feb. 4, 2016, 12:35 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Jie Yu, and Timothy Chen.
> 
> 
> Bugs: MESOS-4005
> https://issues.apache.org/jira/browse/MESOS-4005
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added working dir flag to mesos containerizer launch.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/launch.hpp 
> 722031956494647c81436a95400d939eec4466de 
>   src/slave/containerizer/mesos/launch.cpp 
> 0cfdc0ca1a7e8c6107f8ea46e7a4c6e52811d7ac 
> 
> Diff: https://reviews.apache.org/r/43167/diff/
> 
> 
> Testing
> ---
> 
> make check (ubuntu14.04 + clang-3.6)
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>



Re: Review Request 43167: Added working dir flag to mesos containerizer launch.

2016-02-04 Thread Gilbert Song

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

(Updated Feb. 4, 2016, 5:24 p.m.)


Review request for mesos, Artem Harutyunyan, Jie Yu, and Timothy Chen.


Bugs: MESOS-4005
https://issues.apache.org/jira/browse/MESOS-4005


Repository: mesos


Description
---

Added working dir flag to mesos containerizer launch.


Diffs (updated)
-

  src/slave/containerizer/mesos/launch.hpp 
78d6b9d4f97207ec26ccfdb375db823486a30b37 
  src/slave/containerizer/mesos/launch.cpp 
23970a2ed239c5f4d057361964edffee8f5084b1 

Diff: https://reviews.apache.org/r/43167/diff/


Testing
---

make check (ubuntu14.04 + clang-3.6)


Thanks,

Gilbert Song