Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B37AA18DC1 for ; Wed, 2 Mar 2016 21:26:18 +0000 (UTC) Received: (qmail 21072 invoked by uid 500); 2 Mar 2016 21:26:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 20981 invoked by uid 500); 2 Mar 2016 21:26:18 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 20769 invoked by uid 99); 2 Mar 2016 21:26:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 21:26:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1C1362C1F56 for ; Wed, 2 Mar 2016 21:26:18 +0000 (UTC) Date: Wed, 2 Mar 2016 21:26:18 +0000 (UTC) From: "Xiao Chen (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9888) TestBalancer#testBalancerWithKeytabs should reset KerberosName in test case setup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-9888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15176515#comment-15176515 ] Xiao Chen commented on HDFS-9888: --------------------------------- Sure Zhe, here's a sample error: {noformat} Error Message Login failure for balancer/localhost@EXAMPLE.COM from keytab /data/jenkins/workspace/CDH5-Hadoop-HDFS-2.6.0/hadoop-hdfs-project/hadoop-hdfs/target/test-dir/TestBalancer/balancer.keytab Stacktrace java.io.IOException: Login failure for balancer/localhost@EXAMPLE.COM from keytab /data/jenkins/workspace/CDH5-Hadoop-HDFS-2.6.0/hadoop-hdfs-project/hadoop-hdfs/target/test-dir/TestBalancer/balancer.keytab at org.apache.hadoop.security.authentication.util.KerberosName.getShortName(KerberosName.java:389) at org.apache.hadoop.security.User.(User.java:48) at org.apache.hadoop.security.User.(User.java:43) at org.apache.hadoop.security.UserGroupInformation$HadoopLoginModule.commit(UserGroupInformation.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690) at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687) at javax.security.auth.login.LoginContext.login(LoginContext.java:596) at org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytabAndReturnUGI(UserGroupInformation.java:1171) at org.apache.hadoop.hdfs.server.balancer.TestBalancer.testBalancerWithKeytabs(TestBalancer.java:1594) {noformat} Basically the exception above is from [KerberosName|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosName.java#L389] cannot find rules to apply. Further logging shows that the realm locally is 'APACHE.ORG' instead of 'EXAMPLE.COM'. (a change by HDFS-3016 back in 2012, which is not present locally. Even if that's present, this patch will make the test safer.) > TestBalancer#testBalancerWithKeytabs should reset KerberosName in test case setup > --------------------------------------------------------------------------------- > > Key: HDFS-9888 > URL: https://issues.apache.org/jira/browse/HDFS-9888 > Project: Hadoop HDFS > Issue Type: Test > Reporter: Xiao Chen > Assignee: Xiao Chen > Priority: Minor > Attachments: HDFS-9888.01.patch > > > In some local environments, {{TestBalancer#testBalancerWithKeytabs}} may fail. Specifically, running itself passes, but running {{TestBalancer}} suite always fail. This is due to: > # Kerberos setup is done at the test case setup > # static variable {{KerberosName#defaultRealm}} is set when class initialization - before {{testBalancerWithKeytabs}} setup > # local default realm is different than test case default realm > This is mostly an environment specific problem, but let's not make such assumption in the test. -- This message was sent by Atlassian JIRA (v6.3.4#6332)