ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-8012. Slider View: Creating apps with default user (yarn) wont work on secured HDP cluster (srimanth)
Date Wed, 29 Oct 2014 02:55:34 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e1ad9d3f3 -> 54cba9cac


AMBARI-8012. Slider View: Creating apps with default user (yarn) wont work on secured HDP
cluster (srimanth)


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

Branch: refs/heads/trunk
Commit: 54cba9cac6aab85bdb51015832bdb048566ff8d2
Parents: e1ad9d3
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Tue Oct 28 19:40:48 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Tue Oct 28 19:55:19 2014 -0700

----------------------------------------------------------------------
 contrib/views/slider/docs/index.md                  | 16 ++++++++++------
 .../view/slider/SliderAppsViewControllerImpl.java   | 10 ++++++++++
 2 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/54cba9ca/contrib/views/slider/docs/index.md
----------------------------------------------------------------------
diff --git a/contrib/views/slider/docs/index.md b/contrib/views/slider/docs/index.md
index b6c0bb3..3965cbf 100644
--- a/contrib/views/slider/docs/index.md
+++ b/contrib/views/slider/docs/index.md
@@ -120,12 +120,14 @@ By default, the following keytabs have to be created for specific Apps.
This use
 #### HBase
 For each host `host-name` in the cluster, do the following 
 
-*  ```
+* 
+```
 kadmin.local -q "addprinc -randkey slider-user/[host-name]@EXAMPLE.COM"
 ```
-Next, extract identity into a single keytab file 
+Next, extract identities on all hosts into a single keytab file 
 
-*  ```
+* 
+```
 kadmin.local -q "xst -k /path/to/keytab/slider-user.HBASE.service.keytab slider-user/[host-name]@EXAMPLE.COM"
 ```
 
@@ -140,12 +142,14 @@ Change file permissions so that only necessary users can access it.
 #### Storm
 For each host `host-name` in the cluster, do the following 
 
-*  ```
+* 
+```
 kadmin.local -q "addprinc -randkey slider-user/[host-name]@EXAMPLE.COM"
 ```
-Next, extract keytab file 
+Next, extract all identities into a single keytab file 
 
-*  ```
+* 
+```
 kadmin.local -q "xst -k /path/to/keytab/slider-user.STORM.nimbus.keytab slider-user/[host-name]@EXAMPLE.COM"
 kadmin.local -q "xst -k /path/to/keytab/slider-user.STORM.client.keytab slider-user/[host-name]@EXAMPLE.COM"
 ```

http://git-wip-us.apache.org/repos/asf/ambari/blob/54cba9ca/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index 6b10373..6eebf9a 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -218,6 +218,16 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
               newHadoopConfigs.put("yarn_user", yarnUser); // YARN service user
             }
             newHadoopConfigs.put("slider.user", getUserToRunAs(newHadoopConfigs)); // Slider
user
+            if (newHadoopConfigs.containsKey("security_enabled")) {
+              boolean securityEnabled = Boolean.valueOf(newHadoopConfigs.get("security_enabled"));
+              if (securityEnabled) {
+                String yarnUser = newHadoopConfigs.get("yarn_user");
+                if (yarnUser != null && yarnUser.equals(newHadoopConfigs.get("slider.user")))
{
+                  status.getValidations().add(
+                      new ViewStatus.Validation("Slider view does not support accessing secured
YARN cluster as YARN superuser (" + yarnUser + ")"));
+                }
+              }
+            }
             if (cluster.getDesiredConfigs().containsKey("zookeeper-env")) {
               Map<String, String> zkEnvConfigs = ambariClient.getConfiguration(
                   cluster, "zookeeper-env",


Mime
View raw message