hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/3] git commit: YARN-2700 TestSecureRMRegistryOperations failing on windows: auth problems
Date Wed, 22 Oct 2014 20:14:07 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 9b973b7c8 -> 5e6494ea9
  refs/heads/branch-2.6 cca473a32 -> ada23f3dd
  refs/heads/trunk d67214fd6 -> 90e5ca24f


YARN-2700 TestSecureRMRegistryOperations failing on windows: auth problems


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ada23f3d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ada23f3d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ada23f3d

Branch: refs/heads/branch-2.6
Commit: ada23f3dd326784f6fada6f02f0d908be2de2ab1
Parents: cca473a
Author: Steve Loughran <stevel@apache.org>
Authored: Wed Oct 22 21:12:52 2014 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Wed Oct 22 21:12:52 2014 +0100

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                       |  3 +++
 .../registry/secure/AbstractSecureRegistryTest.java   | 14 ++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ada23f3d/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 04277a1..6700ddb 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -616,6 +616,9 @@ Release 2.6.0 - UNRELEASED
 
     YARN-2692 ktutil test hanging on some machines/ktutil versions (stevel)
 
+    YARN-2700 TestSecureRMRegistryOperations failing on windows: auth problems
+    (stevel)
+
     ---
 
     YARN-2598 GHS should show N/A instead of null for the inaccessible information

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ada23f3d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/AbstractSecureRegistryTest.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/AbstractSecureRegistryTest.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/AbstractSecureRegistryTest.java
index 7fdd261..14a950d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/AbstractSecureRegistryTest.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/AbstractSecureRegistryTest.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.registry.client.impl.zk.ZookeeperConfigOptions;
 import org.apache.hadoop.registry.server.services.AddingCompositeService;
 import org.apache.hadoop.registry.server.services.MicroZookeeperService;
 import org.apache.hadoop.registry.server.services.MicroZookeeperServiceKeys;
+import org.apache.hadoop.util.Shell;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -61,6 +62,7 @@ public class AbstractSecureRegistryTest extends RegistryTestHelper {
   public static final String REALM = "EXAMPLE.COM";
   public static final String ZOOKEEPER = "zookeeper";
   public static final String ZOOKEEPER_LOCALHOST = "zookeeper/localhost";
+  public static final String ZOOKEEPER_1270001 = "zookeeper/127.0.0.1";
   public static final String ZOOKEEPER_REALM = "zookeeper@" + REALM;
   public static final String ZOOKEEPER_CLIENT_CONTEXT = ZOOKEEPER;
   public static final String ZOOKEEPER_SERVER_CONTEXT = "ZOOKEEPER_SERVER";
@@ -118,6 +120,7 @@ public class AbstractSecureRegistryTest extends RegistryTestHelper {
   protected MicroZookeeperService secureZK;
   protected static File jaasFile;
   private LoginContext zookeeperLogin;
+  private static String zkServerPrincipal;
 
   /**
    * All class initialization for this test class
@@ -203,12 +206,13 @@ public class AbstractSecureRegistryTest extends RegistryTestHelper {
     keytab_zk = createKeytab(ZOOKEEPER, "zookeeper.keytab");
     keytab_alice = createKeytab(ALICE, "alice.keytab");
     keytab_bob = createKeytab(BOB, "bob.keytab");
+    zkServerPrincipal = Shell.WINDOWS ? ZOOKEEPER_1270001 : ZOOKEEPER_LOCALHOST;
 
     StringBuilder jaas = new StringBuilder(1024);
     jaas.append(registrySecurity.createJAASEntry(ZOOKEEPER_CLIENT_CONTEXT,
         ZOOKEEPER, keytab_zk));
     jaas.append(registrySecurity.createJAASEntry(ZOOKEEPER_SERVER_CONTEXT,
-        ZOOKEEPER_LOCALHOST, keytab_zk));
+        zkServerPrincipal, keytab_zk));
     jaas.append(registrySecurity.createJAASEntry(ALICE_CLIENT_CONTEXT,
         ALICE_LOCALHOST , keytab_alice));
     jaas.append(registrySecurity.createJAASEntry(BOB_CLIENT_CONTEXT,
@@ -300,7 +304,10 @@ public class AbstractSecureRegistryTest extends RegistryTestHelper {
     assertNotEmpty("empty host", filename);
     assertNotNull("Null KDC", kdc);
     File keytab = new File(kdcWorkDir, filename);
-    kdc.createPrincipal(keytab, principal, principal +"/localhost");
+    kdc.createPrincipal(keytab,
+        principal,
+        principal + "/localhost",
+        principal + "/127.0.0.1");
     return keytab;
   }
 
@@ -351,12 +358,11 @@ public class AbstractSecureRegistryTest extends RegistryTestHelper {
   protected synchronized void startSecureZK() throws Exception {
     assertNull("Zookeeper is already running", secureZK);
 
-    zookeeperLogin = login(ZOOKEEPER_LOCALHOST,
+    zookeeperLogin = login(zkServerPrincipal,
         ZOOKEEPER_SERVER_CONTEXT,
         keytab_zk);
     secureZK = createSecureZKInstance("test-" + methodName.getMethodName());
     secureZK.start();
   }
 
-
 }


Mime
View raw message