Re: Review Request 43020: Exposed accurate ProvisionInfo to command executor.

2016-02-03 Thread Gilbert Song

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

(Updated Feb. 3, 2016, 12:41 p.m.)


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


Repository: mesos


Description
---

Exposed accurate ProvisionInfo to command executor.


Diffs (updated)
-

  src/slave/containerizer/mesos/containerizer.cpp 
4b504dbb58823ce7675f1d2048dcc7a27c05663d 

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


Testing
---

make check (ubuntu14.04 + clang-3.6)


Thanks,

Gilbert Song



Re: Review Request 43020: Exposed accurate ProvisionInfo to command executor.

2016-02-02 Thread Jie Yu

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




src/slave/containerizer/mesos/containerizer.cpp (line 724)


Add some more comments here:
```
For command tasks (i.e., taskInfo.isSome()), the filesystem image for the 
task is specified in a volume (COMMAND_EXECUTOR_ROOTFS_CONTAINER_PATH). We need 
to pass the provisionInfo from that image to isolators through 'prepare'.
```



src/slave/containerizer/mesos/containerizer.cpp (line 726)


I would do the following:

```
Owned> _provisionInfo(new 
ProvisionInfo(provisionInfo));
```



src/slave/containerizer/mesos/containerizer.cpp (lines 738 - 739)


Merge these in one line.



src/slave/containerizer/mesos/containerizer.cpp (lines 738 - 751)


```
futures.push_back(
  provisioner->provision(containerId, image)
.then([=](const ProvisionInfo& info) -> Future {
  volume->set_host_path(info.rootfs);
  
  // Add some comments here about why we need to do this!
  if (taskInfo.isSome() &&
  volume->container_path() ==
COMMAND_EXECUTOR_ROOTFS_CONTAINER_PATH) {
_provisionInfo.reset(new ProvisionInfo(info));
  }
}));
```



src/slave/containerizer/mesos/containerizer.cpp (line 740)


capturing reference here is not correct. It's already a pointer, no need to 
capturing the reference of a pointer.



src/slave/containerizer/mesos/containerizer.cpp (lines 758 - 761)


No need for this.



src/slave/containerizer/mesos/containerizer.cpp (line 772)


`*_provisionInfo` here.


- Jie Yu


On Feb. 2, 2016, 5:18 p.m., Gilbert Song wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43020/
> ---
> 
> (Updated Feb. 2, 2016, 5:18 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Jie Yu, and Timothy Chen.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed accurate ProvisionInfo to command executor.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/containerizer.cpp 
> 4b504dbb58823ce7675f1d2048dcc7a27c05663d 
> 
> Diff: https://reviews.apache.org/r/43020/diff/
> 
> 
> Testing
> ---
> 
> make check (ubuntu14.04 + clang-3.6)
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>



Re: Review Request 43020: Exposed accurate ProvisionInfo to command executor.

2016-02-02 Thread Gilbert Song

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

(Updated Feb. 2, 2016, 9:18 a.m.)


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


Repository: mesos


Description
---

Exposed accurate ProvisionInfo to command executor.


Diffs
-

  src/slave/containerizer/mesos/containerizer.cpp 
4b504dbb58823ce7675f1d2048dcc7a27c05663d 

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


Testing
---

make check (ubuntu14.04 + clang-3.6)


Thanks,

Gilbert Song