[
https://issues.apache.org/jira/browse/HDFS-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aaron T. Myers updated HDFS-3897:
---------------------------------
Attachment: HDFS-3897.patch
Here's a patch which addresses the issue. Previous to HDFS-3893, this test case
was only inadvertently working since the testBlockTokenInLastLocatedBlock test
case creates its own Configuration object (i.e. doesn't reuse the static one in
the test class) and when starting the NN in the MiniDFSCluster this would cause
{{UserGroupInformation#setConfiguration}} to be called with a Configuration
object which had security disabled, thereby globally disabling Kerberos.
The fix is to only enable Kerberos in the conf for those test cases that
actually require it for the functionality they aim to test. This patch also
causes Kerberos to be disabled before each test case is run, which should make
the whole test less fragile. (Previously, testBlockTokenRpc and
testBlockTokenRpcLeak would fail if testBlockTokenInLastLocatedBlock happened
to be run before them.)
I tested this patch by running TestBlockToken and all of the QJM tests. They
all pass with this patch applied.
> QJM: TestBlockToken fails after HDFS-3893
> -----------------------------------------
>
> Key: HDFS-3897
> URL: https://issues.apache.org/jira/browse/HDFS-3897
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Affects Versions: QuorumJournalManager (HDFS-3077)
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Attachments: HDFS-3897.patch
>
>
> HDFS-3893 caused the NN to log in using its configured Kerberos credentials
> when formatting the NN. This caused
> TestBlockToken#testBlockTokenInLastLocatedBlock to begin failing, since the
> test enables Kerberos but doesn't configure the NN principal or keytab.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira