> On March 4, 2016, 11:30 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.hpp, line 28 > > <https://reviews.apache.org/r/44269/diff/4/?file=1280943#file1280943line28> > > > > Maybe: > > The isolator implements support for Container Network Interface (CNI) > > specification <Add github link to spec> . It provides network isolation to > > containers by creating a network namespace for each container, and then > > adding the container to the CNI network sepcified in the `NetworkInfo` for > > the container. It adds the container to a CNI network by using CNI plugins > > specified by the operator for the corresponding CNI network.
Agree. > On March 4, 2016, 11:30 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.cpp, line 80 > > <https://reviews.apache.org/r/44269/diff/4/?file=1280944#file1280944line80> > > > > Shouldn't we do a size check here as well ? Bail out if we don't have > > any files in this directory ? The check `if (netConfigs.size() == 0) {` below it has already covered that case. > On March 4, 2016, 11:30 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.cpp, lines 108-115 > > <https://reviews.apache.org/r/44269/diff/4/?file=1280944#file1280944line108> > > > > isn't this the same as !nameValue.isSome() ? > > > > Also LOG(WARNING) should be LOG(ERROR) Please see https://github.com/apache/mesos/blob/0.27.1/src/docker/docker.cpp#L255:L260 for the existing way to handle the return value of `json.get().find()`. > On March 4, 2016, 11:30 p.m., Avinash sridharan wrote: > > src/slave/containerizer/mesos/isolators/network/cni.cpp, line 134 > > <https://reviews.apache.org/r/44269/diff/4/?file=1280944#file1280944line134> > > > > I don't understand this comment. We just made sure the plugin does not > > exist? So what does the comment imply "it can > > // still be valid as long as operator puts the CNI plugin binary > > // that it uses under '--network_cni_plugins_dir'." ? > > > > I think at this point we should return an error. If can't find an > > executable for a named network, the behavior will become undefined. We > > should bail at this point. My point is, if we can not find a plugin for a named network during initilization, log a warning message to let operator know this issue, and afterward operator can put the plugin in the plugin directory without restarting agent, then the named network can still work. - Qian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44269/#review122077 ----------------------------------------------------------- On March 4, 2016, 10:34 p.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44269/ > ----------------------------------------------------------- > > (Updated March 4, 2016, 10:34 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 > ------- > > Added the framework of 'network/cni' isolator. > > > Diffs > ----- > > src/CMakeLists.txt 0eabfad66f43adff12d08dbf34ca3db1b801c49e > src/Makefile.am 5b54fe04734afc5faa1bba3b84f43a1b8efe8753 > 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/44269/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Qian Zhang > >