From 4de2bd3fbfd99139836db2778512768d6c9e70e8 Mon Sep 17 00:00:00 2001 From: Jason Darrell Lowe Date: Wed, 29 Jan 2014 15:30:04 +0000 Subject: [PATCH] YARN-1600. RM does not startup when security is enabled without spnego configured. Contributed by Haohui Mai git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1562482 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 396c82b26b..f6d145e837 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -562,6 +562,9 @@ Release 2.3.0 - UNRELEASED YARN-1138. yarn.application.classpath is set to point to $HADOOP_CONF_DIR etc., which does not work on Windows. (Chuan Liu via cnauroth) + YARN-1600. RM does not startup when security is enabled without spnego + configured (Haohui Mai via jlowe) + Release 2.2.0 - 2013-10-13 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java index 62f1e45c54..317baec4a3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java @@ -223,7 +223,9 @@ public void setup() { .setPathSpec(pathList.toArray(new String[0])); boolean hasSpnegoConf = spnegoPrincipalKey != null - && spnegoKeytabKey != null; + && conf.get(spnegoPrincipalKey) != null && spnegoKeytabKey != null + && conf.get(spnegoKeytabKey) != null; + if (hasSpnegoConf) { builder.setUsernameConfKey(spnegoPrincipalKey) .setKeytabConfKey(spnegoKeytabKey)