ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/2] ambari git commit: AMBARI-15228. Ambari overwrites permissions on HDFS directories (aonishuk)
Date Fri, 11 Mar 2016 17:06:38 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 b400a0510 -> 4277dbe8e


http://git-wip-us.apache.org/repos/asf/ambari/blob/4277dbe8/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py
index 7bd50ea..14b5a5f 100644
--- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py
+++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_hawqmaster.py
@@ -27,6 +27,7 @@ class TestHawqMaster(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = 'HAWQ/2.0.0/package'
   STACK_VERSION = '2.3'
   GPADMIN = 'gpadmin'
+  DEFAULT_IMMUTABLE_PATHS = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done',
'/app-logs', '/tmp']
 
   def __asserts_for_configure(self):
 
@@ -167,6 +168,7 @@ class TestHawqMaster(RMFTestCase):
         )
 
     self.assertResourceCalled('HdfsResource', '/hawq_default',
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         type = 'directory',
@@ -183,6 +185,7 @@ class TestHawqMaster(RMFTestCase):
         )
 
     self.assertResourceCalled('HdfsResource', None,
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         action = ['execute'],
@@ -230,6 +233,7 @@ class TestHawqMaster(RMFTestCase):
         )
 
     self.assertResourceCalled('HdfsResource', '/hawq_default',
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         type = 'directory',
@@ -246,6 +250,7 @@ class TestHawqMaster(RMFTestCase):
         )
 
     self.assertResourceCalled('HdfsResource', None,
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         default_fs = u'hdfs://c6401.ambari.apache.org:8020',
         hdfs_site = self.getConfig()['configurations']['hdfs-site'],
         action = ['execute'],

http://git-wip-us.apache.org/repos/asf/ambari/blob/4277dbe8/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
index 65df61b..414b6f3 100644
--- a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
@@ -23,6 +23,7 @@ from stacks.utils.RMFTestCase import *
 class TestMahoutClient(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "MAHOUT/1.0.0.2.3/package"
   STACK_VERSION = "2.3"
+  DEFAULT_IMMUTABLE_PATHS = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done',
'/app-logs', '/tmp']
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
@@ -38,7 +39,7 @@ class TestMahoutClient(RMFTestCase):
         mode = 0755,
     )
     self.assertResourceCalled('HdfsResource', '/user/ambari-qa/mahoutsmokeoutput',
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),
@@ -49,7 +50,7 @@ class TestMahoutClient(RMFTestCase):
         type = 'directory',
     )
     self.assertResourceCalled('HdfsResource', '/user/ambari-qa/mahoutsmokeinput',
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),
@@ -61,7 +62,7 @@ class TestMahoutClient(RMFTestCase):
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(),
default_fs='hdfs://c6401.ambari.apache.org:8020',
     )
     self.assertResourceCalled('HdfsResource', '/user/ambari-qa/mahoutsmokeinput/sample-mahout-test.txt',
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),
@@ -74,7 +75,7 @@ class TestMahoutClient(RMFTestCase):
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(),
default_fs='hdfs://c6401.ambari.apache.org:8020',
     )
     self.assertResourceCalled('HdfsResource', None,
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4277dbe8/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py b/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py
index 5f245ee..23f2ae6 100644
--- a/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py
@@ -28,6 +28,7 @@ from only_for_platform import not_for_platform, PLATFORM_WINDOWS
 class TestSparkThriftServer(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "SPARK/1.2.0.2.2/package"
   STACK_VERSION = "2.3"
+  DEFAULT_IMMUTABLE_PATHS = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done',
'/app-logs', '/tmp']
 
   @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs")
   def test_configure_default(self, copy_to_hdfs_mock):
@@ -91,7 +92,7 @@ class TestSparkThriftServer(RMFTestCase):
         mode = 0775
     )
     self.assertResourceCalled('HdfsResource', '/user/spark',
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),
@@ -107,7 +108,7 @@ class TestSparkThriftServer(RMFTestCase):
         mode = 0775,
     )
     self.assertResourceCalled('HdfsResource', None,
-        immutable_paths = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done', '/app-logs',
'/tmp'],
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
         hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin',
         keytab = UnknownConfigurationMock(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4277dbe8/ambari-server/src/test/python/stacks/2.3/YARN/test_ats_1_5.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/YARN/test_ats_1_5.py b/ambari-server/src/test/python/stacks/2.3/YARN/test_ats_1_5.py
index aabe0c0..68708c7 100644
--- a/ambari-server/src/test/python/stacks/2.3/YARN/test_ats_1_5.py
+++ b/ambari-server/src/test/python/stacks/2.3/YARN/test_ats_1_5.py
@@ -36,6 +36,7 @@ origin_exists = os.path.exists
 class TestAts(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "YARN/2.1.0.2.0/package"
   STACK_VERSION = "2.3"
+  DEFAULT_IMMUTABLE_PATHS = ['/apps/hive/warehouse', '/apps/falcon', '/mr-history/done',
'/app-logs', '/tmp']
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/application_timeline_server.py",
@@ -151,7 +152,7 @@ class TestAts(RMFTestCase):
                               cd_access = 'a',
                               )
     self.assertResourceCalled('HdfsResource', '/ats',
-                              immutable_paths = ['/apps/hive/warehouse', '/apps/falcon',
'/mr-history/done', '/app-logs', '/tmp'],
+                              immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
                               hadoop_bin_dir = '/usr/bin',
                               keytab = UnknownConfigurationMock(),
@@ -169,7 +170,7 @@ class TestAts(RMFTestCase):
                               mode = 0755,
                               )
     self.assertResourceCalled('HdfsResource', '/ats/done',
-                              immutable_paths = ['/apps/hive/warehouse', '/apps/falcon',
'/mr-history/done', '/app-logs', '/tmp'],
+                              immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
                               hadoop_bin_dir = '/usr/bin',
                               keytab = UnknownConfigurationMock(),
@@ -186,7 +187,7 @@ class TestAts(RMFTestCase):
                               mode = 0700,
                               )
     self.assertResourceCalled('HdfsResource', '/ats',
-                              immutable_paths = ['/apps/hive/warehouse', '/apps/falcon',
'/mr-history/done', '/app-logs', '/tmp'],
+                              immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
                               hadoop_bin_dir = '/usr/bin',
                               keytab = UnknownConfigurationMock(),
@@ -204,7 +205,7 @@ class TestAts(RMFTestCase):
                               mode = 0755,
                               )
     self.assertResourceCalled('HdfsResource', '/ats/active',
-                              immutable_paths = ['/apps/hive/warehouse', '/apps/falcon',
'/mr-history/done', '/app-logs', '/tmp'],
+                              immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
                               hadoop_bin_dir = '/usr/bin',
                               keytab = UnknownConfigurationMock(),
@@ -221,7 +222,7 @@ class TestAts(RMFTestCase):
                               mode = 01777,
                               )
     self.assertResourceCalled('HdfsResource', None,
-                              immutable_paths = ['/apps/hive/warehouse', '/apps/falcon',
'/mr-history/done', '/app-logs', '/tmp'],
+                              immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
                               security_enabled = False,
                               hadoop_bin_dir = '/usr/bin',
                               keytab = UnknownConfigurationMock(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4277dbe8/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json b/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json
index abe3559..de6e3da 100644
--- a/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json
+++ b/ambari-server/src/test/python/stacks/2.3/configs/hawq_default.json
@@ -82,6 +82,7 @@
     "clusterName": "phd", 
     "hostname": "c6401.ambari.apache.org", 
     "hostLevelParams": {
+        "not_managed_hdfs_path_list": "[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
         "jdk_location": "http://c6401.ambari.apache.org:8080/resources/", 
         "ambari_db_rca_password": "mapred", 
         "java_home": "/usr/jdk64/jdk1.8.0_60", 
@@ -1027,6 +1028,7 @@
             "mapreduce.admin.map.child.java.opts": "-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true
-Dhdp.version=${hdp.version}"
         }, 
         "cluster-env": {
+            "managed_hdfs_resource_property_names": "",
             "security_enabled": "false", 
             "smokeuser_keytab": "/etc/security/keytabs/smokeuser.headless.keytab", 
             "ignore_groupsusers_create": "false", 


Mime
View raw message