> On Sept. 23, 2016, 5:16 a.m., Vinod Kone wrote:
> > src/cli/execute.cpp, lines 468-478
> > <https://reviews.apache.org/r/52177/diff/1/?file=1508583#file1508583line468>
> >
> >     I don't follow this change. Can the TaskGroupInfo JSON not contain the 
> > NetworkInfos? Why do have to specify it via `--networks`?

The proto definitions explicitly state that we should not be setting the 
`NetworkInfo` in indvidual tasks in a task group:
https://github.com/apache/mesos/blob/29236068f23b6cfbd19d7a4b5b96be852818a356/include/mesos/v1/mesos.proto#L1433

Also, its stated here that we should be setting the `NetworkInfo` in 
`ExecutorInfo` to set networks for all tasks in a task group:
https://github.com/apache/mesos/blob/29236068f23b6cfbd19d7a4b5b96be852818a356/include/mesos/v1/mesos.proto#L1290


Hence the setting of network in `ExecutorInfo`.


- Avinash


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


On Sept. 22, 2016, 9:48 p.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52177/
> -----------------------------------------------------------
> 
> (Updated Sept. 22, 2016, 9:48 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Vinod Kone.
> 
> 
> Bugs: MESOS-6096
>     https://issues.apache.org/jira/browse/MESOS-6096
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added support for CNI networks for `--task_group`.
> 
> 
> Diffs
> -----
> 
>   src/cli/execute.cpp 79091d6dd3e09e354f6965b0da45662621297bee 
> 
> Diff: https://reviews.apache.org/r/52177/diff/
> 
> 
> Testing
> -------
> 
> make
> 
> Ran `mesos-execute` with the --task_group and --network option with the 
> following POD definition:
> {
>   "tasks":[
>     {
>       "name" : "nginx",
>       "task_id" : {"value":"nginx"},
>       "agent_id": {"value" : ""},
>       "resources": [{
>         "name": "cpus",
>         "type": "SCALAR",
>         "scalar": {
>           "value": 0.1
>         },
>         "role": "*"
>       },
>       {
>         "name": "mem",
>         "type": "SCALAR",
>         "scalar": {
>           "value": 128
>         },
>         "role": "*"
>       }],
>       "container" : {
>         "type" : "MESOS",
>         "mesos" : {
>           "image" : {
>             "type" : "DOCKER",
>             "docker" : {
>               "name" : "nginx"
>             }
>           }
>         }
>       }
>     },
>     {
>       "name" : "redis",
>       "task_id" : {"value":"redis"},
>       "agent_id": {"value" : ""},
>       "resources": [{
>         "name": "cpus",
>         "type": "SCALAR",
>         "scalar": {
>           "value": 0.1
>         },
>         "role": "*"
>       },
>       {
>         "name": "mem",
>         "type": "SCALAR",
>         "scalar": {
>           "value": 128
>         },
>         "role": "*"
>               }],
>       "container" : {
>         "type" : "MESOS",
>         "mesos" : {
>           "image" : {
>             "type" : "DOCKER",
>             "docker" : {
>               "name" : "redis"
>             }
>           }
>         }
>       }
>     }
>   ]
> }
> 
> The pod definition doesn't do much (mesos can't launch docker containers in 
> PODS right now), but the pod itself is attached to a CNI network and it gets 
> an IP address and a network name space of its own.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>

Reply via email to