ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-6611. container-executor.cfg.j2 contains hardcoded min.user.id=1000 (aonishuk)
Date Mon, 18 Aug 2014 12:05:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f7658040 -> 49a377ce4


AMBARI-6611. container-executor.cfg.j2 contains hardcoded min.user.id=1000 (aonishuk)


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

Branch: refs/heads/trunk
Commit: 49a377ce42b8869041b8d8171dafb143980307c8
Parents: 7f76580
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Aug 18 15:05:37 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Aug 18 15:05:37 2014 +0300

----------------------------------------------------------------------
 .../apache/ambari/server/upgrade/UpgradeCatalog170.java  |  4 ++++
 .../HDP/2.0.6/services/YARN/configuration/yarn-env.xml   |  7 ++++++-
 .../HDP/2.0.6/services/YARN/package/scripts/params.py    |  1 +
 .../YARN/package/templates/container-executor.cfg.j2     |  2 +-
 .../ambari/server/upgrade/UpgradeCatalog170Test.java     |  4 ++++
 .../python/stacks/2.0.6/configs/default.hbasedecom.json  |  3 ++-
 .../src/test/python/stacks/2.0.6/configs/default.json    |  3 ++-
 .../stacks/2.0.6/configs/default.non_gmetad_host.json    |  3 ++-
 .../src/test/python/stacks/2.0.6/configs/ha_default.json |  3 ++-
 .../src/test/python/stacks/2.0.6/configs/ha_secured.json |  3 ++-
 .../stacks/2.0.6/configs/rebalancehdfs_default.json      |  3 ++-
 .../src/test/python/stacks/2.0.6/configs/secured.json    |  3 ++-
 ambari-web/app/data/HDP2/site_properties.js              | 11 +++++++++++
 13 files changed, 41 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index 10e760b..fa47428 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -751,6 +751,10 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
     updateConfigurationProperties("hbase-env",
         Collections.singletonMap("hbase_regionserver_xmn_ratio", "0.2"), false,
         false);
+    
+    updateConfigurationProperties("yarn-env",
+        Collections.singletonMap("min_user_id", "1000"), false,
+        false);
   }
 
   protected void addEnvContentFields() throws AmbariException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/yarn-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/yarn-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/yarn-env.xml
index 4b22260..184aff1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/yarn-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/yarn-env.xml
@@ -51,7 +51,12 @@
     <value>1024</value>
     <description>Max heapsize for NodeManager using a numerical value in the scale
of MB</description>
   </property>
-  
+  <property>
+    <name>min_user_id</name>
+    <value>1000</value>
+    <description>Set to 0 to disallow root from submitting jobs. Set to 1000 to disallow
all superusers from submitting jobs</description>
+  </property>  
+
   <!-- yarn-env.sh -->
   <property>
     <name>content</name>

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
index bc0ad31..8d668d6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/params.py
@@ -144,4 +144,5 @@ mapred_tt_group = default("/configurations/mapred-site/mapreduce.tasktracker.gro
 
 mapred_local_dir = "/tmp/hadoop-mapred/mapred/local"
 hdfs_log_dir_prefix = config['configurations']['hadoop-env']['hdfs_log_dir_prefix']
+min_user_id = config['configurations']['yarn-env']['min_user_id']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
index 90b12e6..c6f1ff6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
@@ -37,4 +37,4 @@ yarn.nodemanager.local-dirs={{nm_local_dirs}}
 yarn.nodemanager.log-dirs={{nm_log_dirs}}
 yarn.nodemanager.linux-container-executor.group={{yarn_executor_container_group}}
 banned.users=hdfs,yarn,mapred,bin
-min.user.id=1000
+min.user.id={{min_user_id}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
index 5a91f56..9325e9f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
@@ -278,6 +278,10 @@ public class UpgradeCatalog170Test {
     upgradeCatalog.updateConfigurationProperties("hbase-env",
         Collections.singletonMap("hbase_regionserver_xmn_ratio", "0.2"), false, false);
     expectLastCall();
+    
+    upgradeCatalog.updateConfigurationProperties("yarn-env",
+        Collections.singletonMap("min_user_id", "1000"), false, false);
+    expectLastCall();
 
     expect(entityManager.getTransaction()).andReturn(trans).anyTimes();
     expect(entityManager.getCriteriaBuilder()).andReturn(cb).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
index 9b0a85e..b3bf5b8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
@@ -421,7 +421,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "hadoop-env": {
             "security_enabled": "false", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index 67bf6f7..bae564f 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -421,7 +421,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "hadoop-env": {
             "security_enabled": "false", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/default.non_gmetad_host.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.non_gmetad_host.json
b/ambari-server/src/test/python/stacks/2.0.6/configs/default.non_gmetad_host.json
index 418c7b2..319863a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.non_gmetad_host.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.non_gmetad_host.json
@@ -415,7 +415,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "hadoop-env": {
             "security_enabled": "false", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/ha_default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/ha_default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/ha_default.json
index 8d0afcd..7adf696 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/ha_default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/ha_default.json
@@ -363,7 +363,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "hadoop-env": {
             "security_enabled": "false", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/ha_secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/ha_secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/ha_secured.json
index 3e08e44..6c61278 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/ha_secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/ha_secured.json
@@ -342,7 +342,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000" 
         }, 
         "hadoop-env": {
             "security_enabled": "false", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/rebalancehdfs_default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/rebalancehdfs_default.json
b/ambari-server/src/test/python/stacks/2.0.6/configs/rebalancehdfs_default.json
index ba11bb5..95b8335 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/rebalancehdfs_default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/rebalancehdfs_default.json
@@ -219,7 +219,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "yarn-log4j": {
             "content": ""

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index 1d47873..88de472 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -464,7 +464,8 @@
             "yarn_heapsize": "1024", 
             "yarn_user": "yarn", 
             "resourcemanager_heapsize": "1024", 
-            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn",
+            "min_user_id": "1000"
         }, 
         "hadoop-env": {
             "security_enabled": "true", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49a377ce/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 3beca55..edadbc8 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1966,6 +1966,17 @@ module.exports =
     },
     {
       "id": "puppet var",
+      "name": "min_user_id",
+      "displayName": "Minimum user ID for submitting job",
+      "isOverridable": true,
+      "displayType": "int",
+      "isVisible": true,
+      "serviceName": "YARN",
+      "filename": "yarn-env.xml",
+      "category": "Advanced"
+    },
+    {
+      "id": "puppet var",
       "name": "yarn_pid_dir_prefix",
       "displayName": "YARN PID Dir Prefix",
       "description": "",


Mime
View raw message