[ 
https://issues.apache.org/jira/browse/HADOOP-11117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144620#comment-14144620
 ] 

Steve Loughran commented on HADOOP-11117:
-----------------------------------------

Some of the test failures are spurious, the only regression appears to be 
{{TestUserGroupInformation}}

These tests are failing because the test code is doing an {{assertEquals}} on 
the expected string; the propagation of the underlying exception message is 
breaking this comparison.

Fix is what could have been done in the first place: use {{String.contains()}} 
as the probe

{code}
testConstructorWithKerberos(org.apache.hadoop.security.TestUserGroupInformation)
  Time elapsed: 0.045 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<...me [email protected][]> but 
was:<...me [email protected][: 
org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No 
rules applied to [email protected]]>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at 
org.apache.hadoop.security.TestUserGroupInformation.testConstructorFailures(TestUserGroupInformation.java:343)
        at 
org.apache.hadoop.security.TestUserGroupInformation.testConstructorWithKerberos(TestUserGroupInformation.java:301)

testConstructorWithRules(org.apache.hadoop.security.TestUserGroupInformation)  
Time elapsed: 0.028 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<... [email protected][]> but was:<... 
[email protected][: 
org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No 
rules applied to [email protected]]>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at 
org.apache.hadoop.security.TestUserGroupInformation.testConstructorFailures(TestUserGroupInformation.java:343)
        at 
org.apache.hadoop.security.TestUserGroupInformation.testConstructorWithRules(TestUserGroupInformation.java:283)
{code}

> UGI HadoopLoginModule doesn't catch & wrap all kerberos-related exceptions
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-11117
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11117
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.5.1
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>             Fix For: 2.6.0
>
>         Attachments: HADOOP-11117-001.patch
>
>
> If something is failing with kerberos login, 
> {{UserGroupInformation.loginUserFromKeytabAndReturnUGI()}} should fail with 
> useful information. But not all exceptions from the inner code are caught and 
> converted to LoginException. Those exceptions that aren't wrapped have their 
> text and stack trace lost somewhere in the javax code, leaving on the text 
> "login failed" and a stack trace of no value whatsoever.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to