You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Sailesh Mukil (Code Review)" <ge...@cloudera.org> on 2017/03/04 00:27:58 UTC

[Impala-ASF-CR] IMPALA-4978: Impala should set the kerberos principal to the FQDN

Sailesh Mukil has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/6260

Change subject: IMPALA-4978: Impala should set the kerberos principal to the FQDN
......................................................................

IMPALA-4978: Impala should set the kerberos principal to the FQDN

Impala calls gethostname() to get the local system's name which is
used as a part of the kerberos principal. This usually works fine
under most settings, however, this is not guaranteed to return the
FQDN of the host under certain scenarios.

Impala should attempt to get the FQDN first which can be obtained by
using getaddrinfo(), and fallback to gethostname() otherwise. This is
the behavior of Hadoop, which we should try to match as closely as
possible.

Change-Id: I1c94f36cb3493afdfcf84f8b31b9897404bd095f
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication.cc
M be/src/util/network-util.cc
M be/src/util/network-util.h
4 files changed, 34 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/60/6260/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6260
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c94f36cb3493afdfcf84f8b31b9897404bd095f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>

[Impala-ASF-CR] IMPALA-4978: Impala should set the kerberos principal to the FQDN

Posted by "Dan Hecht (Code Review)" <ge...@cloudera.org>.
Dan Hecht has posted comments on this change.

Change subject: IMPALA-4978: Impala should set the kerberos principal to the FQDN
......................................................................


Patch Set 1:

Do we want to move forward with this?

-- 
To view, visit http://gerrit.cloudera.org:8080/6260
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c94f36cb3493afdfcf84f8b31b9897404bd095f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-4978: Impala should set the kerberos principal to the FQDN

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-4978: Impala should set the kerberos principal to the FQDN
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6260/1/be/src/rpc/authentication.cc
File be/src/rpc/authentication.cc:

Line 707:     if (!GetFQDN(&hostname).ok()) {
Looks like there is no way to know from the logs or an error message that we failed to get the FQDN, and that we will fall back to the hostname. Seems like that information should be recorded somewhere for debugging.


Line 708:       RETURN_IF_ERROR(GetHostname(&hostname));
Pattern seems a little strange since we might end up calling GetHostName() twice, even returning the same error.

Alternative to consider:
Change GetFQDN() to return a string and a boolean, the latter indicates whether the we got the FQDN or the hostname.


http://gerrit.cloudera.org:8080/#/c/6260/1/be/src/util/network-util.cc
File be/src/util/network-util.cc:

Line 75:     string error_msg = GetStrErrMsg();
Do we need to initialize result to NULL and freeaddrinfo() in this error case? I could not find a definitive answer as to whether we need to do this or not in the man pages on getaddrinfo()


http://gerrit.cloudera.org:8080/#/c/6260/1/be/src/util/network-util.h
File be/src/util/network-util.h:

Line 45: // Return the local machine's FQDN.
GetFullyQualifiedDomainName()?


-- 
To view, visit http://gerrit.cloudera.org:8080/6260
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c94f36cb3493afdfcf84f8b31b9897404bd095f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-4978: Impala should set the kerberos principal to the FQDN

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has abandoned this change. ( http://gerrit.cloudera.org:8080/6260 )

Change subject: IMPALA-4978: Impala should set the kerberos principal to the FQDN
......................................................................


Abandoned

Cleaning up old CRs with no activity
-- 
To view, visit http://gerrit.cloudera.org:8080/6260
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I1c94f36cb3493afdfcf84f8b31b9897404bd095f
Gerrit-Change-Number: 6260
Gerrit-PatchSet: 1
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@gmail.com>
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>