You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xy...@apache.org on 2019/03/05 16:37:21 UTC
[hadoop] branch trunk updated: HDDS-1156. testDelegationToken is
failing in TestSecureOzoneCluster. Contributed by Ajay Kumar.
This is an automated email from the ASF dual-hosted git repository.
xyao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 353b90d HDDS-1156. testDelegationToken is failing in TestSecureOzoneCluster. Contributed by Ajay Kumar.
353b90d is described below
commit 353b90d59e3583a73a76db550d47aa86b3f36d5d
Author: Ajay Yadav <78...@users.noreply.github.com>
AuthorDate: Tue Mar 5 08:37:10 2019 -0800
HDDS-1156. testDelegationToken is failing in TestSecureOzoneCluster. Contributed by Ajay Kumar.
---
.../java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java | 12 ++++--------
.../main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 3 +--
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
index f790b30..c4deeba 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
@@ -27,7 +27,6 @@ import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.TOKE
import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.TOKEN_EXPIRED;
import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.VOLUME_NOT_FOUND;
import static org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod.KERBEROS;
-import org.junit.Ignore;
import static org.slf4j.event.Level.INFO;
import java.io.File;
@@ -418,7 +417,6 @@ public final class TestSecureOzoneCluster {
* @throws Exception
*/
@Test
- @Ignore("TODO:HDDS-1156")
public void testDelegationToken() throws Exception {
// Capture logs for assertions
@@ -496,8 +494,7 @@ public final class TestSecureOzoneCluster {
// initial connection via DT succeeded
omLogs.clearOutput();
- LambdaTestUtils.intercept(OMException.class, "Renew delegation token " +
- "failed",
+ LambdaTestUtils.intercept(OMException.class, "INVALID_AUTH_METHOD",
() -> {
try {
omClient.renewDelegationToken(token);
@@ -565,7 +562,6 @@ public final class TestSecureOzoneCluster {
* @throws Exception
*/
@Test
- @Ignore("TODO:HDDS-1156")
public void testDelegationTokenRenewal() throws Exception {
GenericTestUtils
.setLogLevel(LoggerFactory.getLogger(Server.class.getName()), INFO);
@@ -610,7 +606,7 @@ public final class TestSecureOzoneCluster {
// 1. When token maxExpiryTime exceeds
Thread.sleep(500);
LambdaTestUtils.intercept(OMException.class,
- "Renew delegation token failed",
+ "TOKEN_EXPIRED",
() -> {
try {
omClient.renewDelegationToken(token);
@@ -626,7 +622,7 @@ public final class TestSecureOzoneCluster {
// null or empty )
Token token2 = omClient.getDelegationToken(new Text("randomService"));
LambdaTestUtils.intercept(OMException.class,
- "Renew delegation token failed",
+ "Delegation token renewal failed",
() -> omClient.renewDelegationToken(token2));
Assert.assertTrue(omLogs.getOutput().contains(" with non-matching " +
"renewer randomService"));
@@ -641,7 +637,7 @@ public final class TestSecureOzoneCluster {
tokenId.getBytes(), token2.getPassword(), token2.getKind(),
token2.getService());
LambdaTestUtils.intercept(OMException.class,
- "Renew delegation token failed",
+ "Delegation token renewal failed",
() -> omClient.renewDelegationToken(tamperedToken));
Assert.assertTrue(omLogs.getOutput().contains("can't be found in " +
"cache"));
diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
index ff94935..1755236 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
@@ -1130,8 +1130,7 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
DefaultMetricsSystem.initialize("OzoneManager");
metadataManager.start(configuration);
- // TODO: uncomment this with HDDS-134 to avoid NPE
- //startSecretManagerIfNecessary();
+ startSecretManagerIfNecessary();
// Set metrics and start metrics back ground thread
metrics.setNumVolumes(metadataManager.countRowsInTable(metadataManager
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org