> On March 11, 2016, 6:19 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.cpp, line 228 > > <https://reviews.apache.org/r/44514/diff/2/?file=1294398#file1294398line228> > > > > Can there be a use case where you want multiple NICs to be attached to > > the same network? Servers use this configuration when they want to utilize > > NIC bonding. To aggregate the bandwidth available on the NICs > > Qian Zhang wrote: > Good point! I think it makes sense that user enables NIC bonding by > creating a bond device (e.g., bond0) as the master of the normal ethernet > devices (e.g., eth0 and eth1), and both eth0 and eth1 are set up by CNI > plugin and get assigned IP from CNI plugin in the same subnet. My only > concern is, how to configure the IP for bond0, maybe just use IP of either > eth0 or eth1 as its IP?
I think for the time being we can leave the behavior as is. To support something like NIC bonding, I think we will need to introduce the concept of `repeated` devices in `NetworkInfo`, which is definitely out of the scope of this work. > On March 11, 2016, 6:19 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.cpp, line 236 > > <https://reviews.apache.org/r/44514/diff/2/?file=1294398#file1294398line236> > > > > If the CNI configuration is host-local then we will be calling the > > host-local plugin during `isolate`. So why do we need this? > > Qian Zhang wrote: > The purpose of this comment is, when we support to explicitly request an > IP for container in future, here we need to get `NetworkInfo.ip_addresses` to > know which IP the container want to request, and keep it in the isolator > (e.g., in the Info struct for the container), and later in isolate() method, > we need to set the value of the environment variable `CNI_ARGS` to that IP > when invoking plugin, see > https://github.com/appc/cni/blob/master/Documentation/host-local.md#supported-arguments > for more details. Now that we have a `struct Info` for each container, we should have `NetworkInfo` as a field in `struct Info`. We can store any statically defined IP addresses in the `NetworkInfo`. - Avinash ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44514/#review123176 ----------------------------------------------------------- On March 10, 2016, 2:20 p.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44514/ > ----------------------------------------------------------- > > (Updated March 10, 2016, 2:20 p.m.) > > > Review request for mesos, Avinash sridharan, Gilbert Song, and Jie Yu. > > > Bugs: MESOS-4759 > https://issues.apache.org/jira/browse/MESOS-4759 > > > Repository: mesos > > > Description > ------- > > Implemented prepare() method of "network/cni" isolator. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/network/cni.hpp PRE-CREATION > src/slave/containerizer/mesos/isolators/network/cni.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/44514/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Qian Zhang > >