Greg Solovyev has posted comments on this change. ( http://gerrit.cloudera.org:8080/12474 )
Change subject: KUDU-1900: add loopback check and test ...................................................................... Patch Set 10: (4 comments) http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/integration-tests/security-itest.cc File src/kudu/integration-tests/security-itest.cc: http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/integration-tests/security-itest.cc@330 PS10, Line 330: KUDU_RETURN_NOT_OK_LOG(GetLocalNetworks(&local_networks), ERROR, > Use RETURN_NOT_OK_PREPEND instead; that's what we typically do. My reason for using KUDU_RETURN_NOT_OK_LOG instead of just KUDU_RETURN_NOT_OK is so that when a test fails because of some misconfiguration of network, it is easier to figure out why it failed. I have also noticed that we never use KUDU_RETURN_NOT_OK_LOG anywhere. What is the reason for using _PREPEND instead of _LOG here? http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/integration-tests/security-itest.cc@334 PS10, Line 334: if (!network.IsLoopBack()) { > Nit: indentation Done http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/util/net/net_util.h File src/kudu/util/net/net_util.h: http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/util/net/net_util.h@95 PS10, Line 95: // Returns true if addr is within 127.0.0.0/8 range. : static bool IsLoopBack(const uint32_t addr); : : // Returns dotted-decimal ('1.2.3.4') representation of IP address in addr. : static std::string AddrToString(const uint32_t addr); > Nit: not really seeing why these args should be const; they're passed by va Done http://gerrit.cloudera.org:8080/#/c/12474/10/src/kudu/util/net/net_util.h@141 PS10, Line 141: bool IsLoopBack() const; > Nit: existing code (see socket.{cc,h}) refers to it as "Loopback", so let's Done -- To view, visit http://gerrit.cloudera.org:8080/12474 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3483a9729ddeeb7901e3738532a45b49e713208f Gerrit-Change-Number: 12474 Gerrit-PatchSet: 10 Gerrit-Owner: Greg Solovyev <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Greg Solovyev <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Sat, 16 Feb 2019 02:18:24 +0000 Gerrit-HasComments: Yes
