----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62017/#review184603 -----------------------------------------------------------
Fix it, then Ship it! src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/port_mapper.cpp Lines 145-150 (original), 148-159 (patched) <https://reviews.apache.org/r/62017/#comment260767> What about changing it to the below? ``` if (args.isError()) { return PluginError( "Failed to get the required field 'args': " + args.error(), ERROR_BAD_ARGS); } else if (args.isNone()) { JSON::Object _args; JSON::Object mesos; mesos.values["network_info"] = JSON::Object(); _args.values["org.apache.mesos"] = mesos; args = _args; } ``` - Qian Zhang On Sept. 6, 2017, 5:47 a.m., Deepak Goel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62017/ > ----------------------------------------------------------- > > (Updated Sept. 6, 2017, 5:47 a.m.) > > > Review request for mesos and Avinash sridharan. > > > Bugs: mesos-7923 > https://issues.apache.org/jira/browse/mesos-7923 > > > Repository: mesos > > > Description > ------- > > Mesos port mapper cni plugin is a wrapper around bridge plugin > to add port mapping functionality to bridge plugin. However, in > certain cases the network creator doesn't need port mapping > functionality and just want to access bridge plugin. In this case, > the creator may not supply `args` in cni config which will makes > mesos port mapper plugin to fail. This patch makes `args` in cni > config optional for mesos port mapper plugin > > > Diffs > ----- > > > src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/port_mapper.cpp > 43cf3e44a55c56dc8195c9cd05f6edd8bf13d448 > > > Diff: https://reviews.apache.org/r/62017/diff/3/ > > > Testing > ------- > > > Thanks, > > Deepak Goel > >
