Skip to content

Commit

Permalink
[MINOR UPDATE]: Fix Hadoop 3 impersonation test errors during CI runs (
Browse files Browse the repository at this point in the history
…apache#2822)

* Shut down MiniDFS cluster in TestInboundImpersonation.selectChainedView.

* Ensure that MiniDFS is using simple auth in BaseTestImpersonation.
  • Loading branch information
jnturton committed Jan 3, 2024
1 parent b19a253 commit 7b5d640
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ protected static void startMiniDfsCluster(String testClass, boolean isImpersonat
// Set the proxyuser settings so that the user who is running the Drillbits/MiniDfs can impersonate other users.
dfsConf.set(String.format("hadoop.proxyuser.%s.hosts", processUser), "*");
dfsConf.set(String.format("hadoop.proxyuser.%s.groups", processUser), "*");

// It isn't clear exactly when or why the following reinitialisation is
// needed, but without it the test subclasses of this class may crash
// when run in the GitHub CI with Mini DFS stating "Running in secure
// mode, but config doesn't have a keytab".
dfsConf.set("hadoop.security.authentication", "simple");
UserGroupInformation.setConfiguration(dfsConf);
}

// Start the MiniDfs cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public void selectChainedView() throws Exception {
.go();
}
adminClient.resetSystem(ExecConstants.IMPERSONATION_POLICIES_KEY);
} finally {
stopMiniDfsCluster();
}
}

Expand Down

0 comments on commit 7b5d640

Please sign in to comment.