-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17849 : Fix for Namenode crashed while cleaning up Expired Delegation tokens of older realm #8054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
HDFS-17849 : Fix for Namenode crashed while cleaning up Expired Delegation tokens of older realm #8054
Conversation
…delegation tokens from cache and proceeding to remove
| expiredTokens.add(entry.getKey()); | ||
| removeTokenForOwnerStats(entry.getKey()); | ||
| try { | ||
| removeTokenForOwnerStats(entry.getKey()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @arunreddyav for your report and contribution, I am a little confused the token could be leak when thrown exception here. I think the smooth way is config the hadoop.security.auth_to_local when change the realm. What do you think about? Thanks again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The token will not be leaked as I'm catching the exception and cleaned up in the
logExpireTokens(expiredTokens);. - Including the older rules under hadoop.security.auth_to_local could be a possible approach; however, the customer prefers not to include the older rules for security reasons (for ex :- when moved to more secure zone old keytabs should not be allowed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Got it. Make sense to me. However
tokenOwnerStatscould not be clean, this is one nit issue. - 'when moved to more secure zone old keytabs should not be allowed' - I think this should be resolved at KDC side not Hadoop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @Hexiaoqiao . Our customers create cluster does a sample job checks with local kerberoes. Once initial setup is done they will configure LDAP/Active Directory through Ambari . Once AD realm is configured they can not keep old realm based auth rules as its against the security
|
💔 -1 overall
This message was automatically generated. |
Description of PR
JIRA: HDFS-17849. Fix for NN crash issue during token cleanup after updating the kerb auth rules to pickup new realm configuration from existing one.
How was this patch tested?
I have tested this change on Hadoop 3.4.1 by replacing the hadoop-common JARs.
The log message appears correctly in the NameNode logs as shared below, and the NameNode starts up successfully.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?