----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56493/#review165359 -----------------------------------------------------------
Fix it, then Ship it! src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (line 1588) <https://reviews.apache.org/r/56493/#comment237191> Please use full sentense for comments. For this particular case, please add a tailing period. src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (lines 1593 - 1600) <https://reviews.apache.org/r/56493/#comment237192> Instead of relying on error, can we explicitly check if `/sys/class/net/<ifname>/speed` exists. ``` const string eth0SpeedPath = path::join("/sys/class/net", eth0.get(), "speed"); if (!os::exists(eth0SpeedPath)) { LOG(WARNING) << "..."; } Try<string> value = os::read(eth0SpeedPath); if (value.isError()) { ... } ... ``` src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (lines 1600 - 1601) <https://reviews.apache.org/r/56493/#comment237193> ``` } else { ``` src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (line 1602) <https://reviews.apache.org/r/56493/#comment237194> Please fix the indentation. src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (line 1610) <https://reviews.apache.org/r/56493/#comment237195> ``` LOG(WARNING) << "Link speed reporting is not supported for '" << eth0.get() << "'"; ``` src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (lines 1612 - 1613) <https://reviews.apache.org/r/56493/#comment237196> Ditto. - Jie Yu On Feb. 9, 2017, 1 p.m., Pierre Cheynier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56493/ > ----------------------------------------------------------- > > (Updated Feb. 9, 2017, 1 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-7074 > https://issues.apache.org/jira/browse/MESOS-7074 > > > Repository: mesos > > > Description > ------- > > Since a lot of environments do not provide interface speed in > /sys/class/net/<ifname>/speed`. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/network/port_mapping.cpp > f6f2bfe1d5d3c113036ad44a480f97bbb462a269 > > Diff: https://reviews.apache.org/r/56493/diff/ > > > Testing > ------- > > ./configure > make -j 8 > make check > > > Thanks, > > Pierre Cheynier > >
