mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash sridharan <avin...@mesosphere.io>
Subject Re: Review Request 45731: Introduced '--networks' flag to mesos-execute.
Date Wed, 06 Apr 2016 14:16:45 GMT


> On April 6, 2016, 12:46 a.m., Avinash sridharan wrote:
> > src/cli/execute.cpp, line 356
> > <https://reviews.apache.org/r/45731/diff/2/?file=1325791#file1325791line356>
> >
> >     It would much simpler to have a single if conditional here as follows:
> >     if (networks.isSome()) {
> >             ContainerInfo* containerInfo =              task.mutable_container();
> >     
> >              foreach (const string& network,
> >                   strings::split(networks.get(), ","))           {
> >                  containerInfo->add_network_infos()->set_name(network);
> >               }
> >     }
> 
> Qian Zhang wrote:
>     But we need to have different logic to handle the flag `--networks` for `MesosContainerizer`
and `DockerContainerizer`, i.e., for `DockerContainerizer`, we need to make sure user is not
allowed to set multiple networks, but for `MesosContainerizer`, we do not need to make sure
that. So I'd like to handle `--networks` separately.

This should be straightforward. At the end of the loop :
 if (containerInfo->network_info_size() > 1 && containerizer == "docker) {
             return Error(....) 
 }


- Avinash


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


On April 6, 2016, 7:56 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45731/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 7:56 a.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5117
>     https://issues.apache.org/jira/browse/MESOS-5117
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Introduced '--networks' flag to mesos-execute.
> 
> 
> Diffs
> -----
> 
>   src/cli/execute.cpp af62f41622e1c43acd8f257c54f8754162c433b8 
> 
> Diff: https://reviews.apache.org/r/45731/diff/
> 
> 
> Testing
> -------
> 
> Ran the following command:
>   `sudo src/mesos-execute --master=192.168.122.171:5050 --name=test --docker_image=library/busybox
--command="sleep 30" --shell=true --networks=net1,net2`
> 
> The created container successfully joined the CNI networks `net1` and `net2`.
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message