You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Timothy Chen <tn...@apache.org> on 2015/01/06 23:18:28 UTC
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated Jan. 6, 2015, 10:18 p.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Repository: mesos-git
Description
-------
Add option to launch docker containers with helper containers.
Diffs
-----
src/slave/containerizer/docker.hpp 28ebc6272cd68167fc9a0898fd8eb9d53890b815
src/slave/containerizer/docker.cpp 19a6ea2b5342abe4bf10cf4ea2d5d756df9f8665
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated April 7, 2015, 12:46 a.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Bugs: MESOS-2183
https://issues.apache.org/jira/browse/MESOS-2183
Repository: mesos
Description
-------
Add option to launch docker containers with helper containers.
Diffs
-----
src/slave/containerizer/docker.hpp b7bf54a
src/slave/containerizer/docker.cpp 5f4b4ce
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.hpp, line 219
> > <https://reviews.apache.org/r/29334/diff/5/?file=824296#file824296line219>
> >
> > IMHO readability is subverted by prolonging the underscore scheme when there is no strict series of continuations. This code would be so much more easy to read if there were descriptive method names. Absent these, please add comments that summarize the purpose and general approach of these methods in places such as this one.
The comments is in the cpp code itself, I'm not inclined to add comments in the header since this is not really used outside.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.hpp, line 196
> > <https://reviews.apache.org/r/29334/diff/5/?file=824296#file824296line196>
> >
> > At this compleity level, the comments here have begun to look like an anti-pattern that might create unwanted precedent for others to mimic. IMHO this was already the case before this patch, but the current additions exacerbate it.
> >
> > The naming launchInContainer helps, but it is still in line with the expected style?
> >
> > It seems to me that the expected style breaks down here. Ideas?
I think this is going to stay until we have a better naming scheme.
- Timothy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68559
-----------------------------------------------------------
On April 7, 2015, 12:46 a.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated April 7, 2015, 12:46 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Bugs: MESOS-2183
> https://issues.apache.org/jira/browse/MESOS-2183
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.cpp, line 615
> > <https://reviews.apache.org/r/29334/diff/5/?file=824297#file824297line615>
> >
> > Here one can see that we are dealing with a more general graph than a series. How can one know why ___launch (3 underscores) is not needed in this branch?
> >
> > And how can one know what ___launch, ____launch, _____launch do in the first place? One must read them all, memorize them, and then read this stretch of code again. Ideas?
We can talk about what we like this to be, and I'd like to avoid general renaming and flow changes in this patch, we can file another JIRA if we need changes to make things more clear.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.cpp, line 784
> > <https://reviews.apache.org/r/29334/diff/5/?file=824297#file824297line784>
> >
> > "mesos-docker-executor" comes out of nowhere. Declaring it as a constant (possibly, but not necessarily in this file) would provide a natural way to link to background information (e.g. what exactly this program does and where to find it). This info could then be found trivially by looking up said declaration, where one would place some explanations.
As it's only referenced here, I'll just leave comment around it for now.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.cpp, line 982
> > <https://reviews.apache.org/r/29334/diff/5/?file=824297#file824297line982>
> >
> > Not checking the outcome of this?
This is actually reverted in the last patch I have, so please ignore this.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.cpp, line 1421
> > <https://reviews.apache.org/r/29334/diff/5/?file=824297#file824297line1421>
> >
> > not -> not have
> > on -> in
> > has -> had been
> > executor -> executors
This is no longer relevant in the my latest patch in this seris, please ignore.
- Timothy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68559
-----------------------------------------------------------
On April 7, 2015, 12:46 a.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated April 7, 2015, 12:46 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Bugs: MESOS-2183
> https://issues.apache.org/jira/browse/MESOS-2183
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
> On Jan. 18, 2015, 12:18 p.m., Bernd Mathiske wrote:
> > src/slave/containerizer/docker.cpp, line 982
> > <https://reviews.apache.org/r/29334/diff/5/?file=824297#file824297line982>
> >
> > Not checking the outcome of this?
>
> Timothy Chen wrote:
> This is actually reverted in the last patch I have, so please ignore this.
Also we never used to check the outcome as it's just a best effort, I'll leave a comment in for now. Going to merge these patches and later finalize the remaining ones.
- Timothy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68559
-----------------------------------------------------------
On April 7, 2015, 12:46 a.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated April 7, 2015, 12:46 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Bugs: MESOS-2183
> https://issues.apache.org/jira/browse/MESOS-2183
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Bernd Mathiske <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68559
-----------------------------------------------------------
src/slave/containerizer/docker.hpp
<https://reviews.apache.org/r/29334/#comment112866>
At this compleity level, the comments here have begun to look like an anti-pattern that might create unwanted precedent for others to mimic. IMHO this was already the case before this patch, but the current additions exacerbate it.
The naming launchInContainer helps, but it is still in line with the expected style?
It seems to me that the expected style breaks down here. Ideas?
src/slave/containerizer/docker.hpp
<https://reviews.apache.org/r/29334/#comment112871>
IMHO readability is subverted by prolonging the underscore scheme when there is no strict series of continuations. This code would be so much more easy to read if there were descriptive method names. Absent these, please add comments that summarize the purpose and general approach of these methods in places such as this one.
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112870>
Here one can see that we are dealing with a more general graph than a series. How can one know why ___launch (3 underscores) is not needed in this branch?
And how can one know what ___launch, ____launch, _____launch do in the first place? One must read them all, memorize them, and then read this stretch of code again. Ideas?
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112868>
When using names such as "___launch" without any trace of what the continuation specified actually does, then we need a comment somewhere to explain purpose and general approach. This can be minimal, but putting nothing at all forces inefficient depth-first code reading.
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112872>
I would group this differently:
ContainerInfo::DockerInfo dockerInfo;
dockerInfo.set_image(flags.docker_mesos_image.get());
ContainerInfo containerInfo;
containerInfo.mutable_docker()->CopyFrom(dockerInfo);
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112873>
"mesos-docker-executor" comes out of nowhere. Declaring it as a constant (possibly, but not necessarily in this file) would provide a natural way to link to background information (e.g. what exactly this program does and where to find it). This info could then be found trivially by looking up said declaration, where one would place some explanations.
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112874>
It would be clearer not reusing the volume variable here.
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112875>
Not checking the outcome of this?
src/slave/containerizer/docker.cpp
<https://reviews.apache.org/r/29334/#comment112876>
not -> not have
on -> in
has -> had been
executor -> executors
- Bernd Mathiske
On Jan. 16, 2015, 5:36 p.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated Jan. 16, 2015, 5:36 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Bernd Mathiske <be...@mesosphere.io>.
> On Jan. 16, 2015, 6:06 p.m., Ben Mahler wrote:
> > Helper containers? Was there any discussion or ticket related to this?
+1
- Bernd
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68537
-----------------------------------------------------------
On Jan. 16, 2015, 5:36 p.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated Jan. 16, 2015, 5:36 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Bernd Mathiske <be...@mesosphere.io>.
> On Jan. 16, 2015, 6:06 p.m., Ben Mahler wrote:
> > Helper containers? Was there any discussion or ticket related to this?
>
> Bernd Mathiske wrote:
> +1
An overview of what this is about placed in a JIRA, the review request, and the source code would be helpful.
- Bernd
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68537
-----------------------------------------------------------
On Jan. 16, 2015, 5:36 p.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated Jan. 16, 2015, 5:36 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
> On Jan. 17, 2015, 2:06 a.m., Ben Mahler wrote:
> > Helper containers? Was there any discussion or ticket related to this?
>
> Bernd Mathiske wrote:
> +1
>
> Bernd Mathiske wrote:
> An overview of what this is about placed in a JIRA, the review request, and the source code would be helpful.
there are jiras describing the problems, sorry
i didnt put out any design discussions as this is largely
based on discussions with BenH. in fact we
are still considering impl choices.
i an going to write up the approach and have more discussions once that is finalized and ill post a wili page on jira
- Timothy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68537
-----------------------------------------------------------
On Jan. 17, 2015, 1:36 a.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated Jan. 17, 2015, 1:36 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/#review68537
-----------------------------------------------------------
Helper containers? Was there any discussion or ticket related to this?
- Ben Mahler
On Jan. 17, 2015, 1:36 a.m., Timothy Chen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29334/
> -----------------------------------------------------------
>
> (Updated Jan. 17, 2015, 1:36 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Bernd Mathiske.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Add option to launch docker containers with helper containers.
>
>
> Diffs
> -----
>
> src/slave/containerizer/docker.hpp b7bf54a
> src/slave/containerizer/docker.cpp 5f4b4ce
>
> Diff: https://reviews.apache.org/r/29334/diff/
>
>
> Testing
> -------
>
> make, tests are fixed in next commit
>
>
> Thanks,
>
> Timothy Chen
>
>
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated Jan. 17, 2015, 1:36 a.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Changes
-------
rebased.
Repository: mesos-git
Description
-------
Add option to launch docker containers with helper containers.
Diffs (updated)
-----
src/slave/containerizer/docker.hpp b7bf54a
src/slave/containerizer/docker.cpp 5f4b4ce
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated Jan. 9, 2015, 1:19 a.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Repository: mesos-git
Description
-------
Add option to launch docker containers with helper containers.
Diffs (updated)
-----
src/slave/containerizer/docker.hpp b7bf54a
src/slave/containerizer/docker.cpp 5f4b4ce
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated Jan. 9, 2015, 1:17 a.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Changes
-------
Rebased
Repository: mesos-git
Description
-------
Add option to launch docker containers with helper containers.
Diffs (updated)
-----
src/slave/containerizer/docker.cpp 5f4b4ce
src/slave/flags.hpp f1b8dfb
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen
Re: Review Request 29334: Add option to launch docker containers with
helper containers.
Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29334/
-----------------------------------------------------------
(Updated Jan. 9, 2015, 1:09 a.m.)
Review request for mesos, Benjamin Hindman and Bernd Mathiske.
Repository: mesos-git
Description
-------
Add option to launch docker containers with helper containers.
Diffs (updated)
-----
src/slave/containerizer/docker.hpp b7bf54a
src/slave/containerizer/docker.cpp 5f4b4ce
Diff: https://reviews.apache.org/r/29334/diff/
Testing
-------
make, tests are fixed in next commit
Thanks,
Timothy Chen