> On Sept. 3, 2014, 10:59 a.m., Tom Arnfeld wrote:
> > What's the reason for not also supporting the `port` resource type? For 
> > example, the Hadoop framework uses this 
> > https://github.com/mesos/hadoop/blob/master/src/main/java/org/apache/hadoop/mapred/ResourcePolicy.java#L458-L472.
> >  I noticed there's a TODO here 
> > https://github.com/apache/mesos/blob/master/src/docker/docker.cpp#L256 to 
> > support the ports resource.
> > 
> > I think it'd be nice to support both this kind of PortMapping behaviour for 
> > explicit mappings, as you've done in the DockerInfo protobuf, but if I just 
> > need any old port that's available to bind to a resource type would be 
> > useful.
> 
> Timothy Chen wrote:
>     What do you think that will look like with docker run? I'm trying to 
> think how a allocated port will then be translated into a mapping to the 
> container/host.
> 
> Tom Arnfeld wrote:
>     So if you're using the port resource, you're basically securing a single 
> port for use by your container and your contianer only, from the host. I 
> imagine this being identical to the current external containerizer 
> implementations, using `-p 1234:1234` to map the allocated port on the host 
> to the same port inside the container.

Hi Tom, thanks for the comment, I chatted with several folks and yes the 
direction I'm going now is to have explicit mapping like you defined. I have 
that exactly in my very last update in this reviewboard.
What I'm also going to do besides just allowing explicit mapping, is to verify 
if you want to map a host port you must have a resources in your task info that 
has port resources for that port.


- Timothy


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


On Sept. 4, 2014, 10:04 p.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25270/
> -----------------------------------------------------------
> 
> (Updated Sept. 4, 2014, 10:04 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Timothy St. Clair.
> 
> 
> Bugs: MESOS-1621
>     https://issues.apache.org/jira/browse/MESOS-1621
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Review: https://reviews.apache.org/r/25270
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto dea51f94d130c131421c43e7fd774ceb8941f501 
>   src/docker/docker.cpp af51ac9058382aede61b09e06e312ad2ce6de03e 
>   src/slave/slave.cpp bd31831022c97e68b0293d66e1eb5f28ac508525 
>   src/tests/docker_containerizer_tests.cpp 
> 8654f9c787bd207f6a7b821651e0c083bea9dc8a 
> 
> Diff: https://reviews.apache.org/r/25270/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>

Reply via email to