ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject ambari git commit: AMBARI-8612. Hard permissions should be handled on user defined data directories (Szilard Nemethy via ncole)
Date Mon, 15 Dec 2014 12:41:33 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1a270b81c -> 12ac2945f


AMBARI-8612. Hard permissions should be handled on user defined data directories (Szilard Nemethy via ncole)


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

Branch: refs/heads/trunk
Commit: 12ac2945fba3aa15ba1dc4fc0502aff825a76758
Parents: 1a270b8
Author: Nate Cole <ncole@hortonworks.com>
Authored: Mon Dec 15 07:41:22 2014 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Mon Dec 15 07:41:22 2014 -0500

----------------------------------------------------------------------
 .../core/providers/system.py                    | 23 ++++++++++++++-
 .../core/resources/system.py                    |  1 +
 .../2.0.6/hooks/before-ANY/scripts/params.py    |  2 --
 .../before-ANY/scripts/shared_initialization.py | 13 ++++-----
 .../services/HBASE/package/scripts/hbase.py     |  3 +-
 .../HDFS/package/scripts/hdfs_datanode.py       |  1 +
 .../HDFS/package/scripts/hdfs_namenode.py       |  3 +-
 .../HDFS/package/scripts/hdfs_snamenode.py      |  1 +
 .../HDFS/package/scripts/journalnode.py         |  1 +
 .../services/OOZIE/package/scripts/oozie.py     |  5 ++--
 .../services/YARN/package/scripts/params.py     |  2 --
 .../2.0.6/services/YARN/package/scripts/yarn.py |  8 ++----
 .../ZOOKEEPER/package/scripts/zookeeper.py      |  1 +
 .../services/FALCON/package/scripts/falcon.py   |  9 ++++--
 .../2.1/services/STORM/package/scripts/storm.py |  3 +-
 .../stacks/2.0.6/HBASE/test_hbase_client.py     |  2 ++
 .../stacks/2.0.6/HBASE/test_hbase_master.py     |  2 ++
 .../2.0.6/HBASE/test_hbase_regionserver.py      |  2 ++
 .../python/stacks/2.0.6/HDFS/test_datanode.py   |  2 ++
 .../stacks/2.0.6/HDFS/test_journalnode.py       |  2 ++
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |  2 ++
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  |  2 ++
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     | 30 ++++++++++++--------
 .../stacks/2.0.6/YARN/test_historyserver.py     |  8 ------
 .../stacks/2.0.6/YARN/test_mapreduce2_client.py |  8 ------
 .../stacks/2.0.6/YARN/test_nodemanager.py       | 24 +++++++---------
 .../stacks/2.0.6/YARN/test_resourcemanager.py   |  8 ------
 .../stacks/2.0.6/YARN/test_yarn_client.py       | 12 --------
 .../2.0.6/ZOOKEEPER/test_zookeeper_client.py    |  2 ++
 .../2.0.6/ZOOKEEPER/test_zookeeper_server.py    |  2 ++
 .../2.0.6/hooks/before-ANY/test_before_any.py   | 13 ++++-----
 .../stacks/2.1/FALCON/test_falcon_server.py     |  1 +
 .../python/stacks/2.1/STORM/test_storm_base.py  |  6 ++++
 .../stacks/2.1/YARN/test_apptimelineserver.py   |  7 ++---
 34 files changed, 113 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-common/src/main/python/resource_management/core/providers/system.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/system.py b/ambari-common/src/main/python/resource_management/core/providers/system.py
index e9121a3..b3949df 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/system.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/system.py
@@ -149,7 +149,11 @@ class DirectoryProvider(Provider):
     if not os.path.exists(path):
       Logger.info("Creating directory %s" % self.resource)
       if self.resource.recursive:
-        sudo.makedirs(path, self.resource.mode or 0755)
+        if self.resource.recursive_permission:
+          DirectoryProvider.makedirs_and_set_permission_recursively(path, self.resource.owner,
+                                                                    self.resource.group, self.resource.mode)
+        else:
+          sudo.makedirs(path, self.resource.mode or 0755)
       else:
         dirname = os.path.dirname(path)
         if not os.path.isdir(dirname):
@@ -163,6 +167,23 @@ class DirectoryProvider(Provider):
     _ensure_metadata(path, self.resource.owner, self.resource.group,
                         mode=self.resource.mode)
 
+  @staticmethod
+  def makedirs_and_set_permission_recursively(path, owner, group, mode):
+    folders=[]
+    path,folder=os.path.split(path)
+    while folder!="":
+      folders.append(folder)
+      path,folder=os.path.split(path)
+    if path!="":
+      folders.append(path)
+    folders.reverse()
+    dir_prefix=""
+    for folder in folders:
+      dir_prefix=os.path.join(dir_prefix, folder)
+      if not os.path.exists(dir_prefix):
+        sudo.makedir(dir_prefix, mode or 0755)
+        _ensure_metadata(dir_prefix, None, None, mode)
+
   def action_delete(self):
     path = self.resource.path
     if os.path.exists(path):

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-common/src/main/python/resource_management/core/resources/system.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/resources/system.py b/ambari-common/src/main/python/resource_management/core/resources/system.py
index a86fa54..b0729d1 100644
--- a/ambari-common/src/main/python/resource_management/core/resources/system.py
+++ b/ambari-common/src/main/python/resource_management/core/resources/system.py
@@ -47,6 +47,7 @@ class Directory(Resource):
   owner = ResourceArgument()
   group = ResourceArgument()
   recursive = BooleanArgument(default=False) # this work for 'create', 'delete' is anyway recursive
+  recursive_permission = BooleanArgument(default=False) # sets given perms to all non-existent folders which are created recursively
 
   actions = Resource.actions + ["create", "delete"]
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
index e726285..fd38d92 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
@@ -95,8 +95,6 @@ else:
   hadoop_home = "/usr/lib/hadoop"
   hadoop_secure_dn_user = hdfs_user
 
-hadoop_root_dir = "/hadoop"
-hadoop_data_dir = "/hadoop/hdfs"
 hadoop_dir = "/etc/hadoop"
 hadoop_conf_dir = "/etc/hadoop/conf"
 hadoop_conf_empty_dir = "/etc/hadoop/conf.empty"

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
index 15bae9d..bf9c055 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
@@ -83,6 +83,12 @@ def setup_users():
   set_uid(params.smoke_user, params.smoke_user_dirs)
 
   if params.has_hbase_masters:
+    Directory (params.hbase_tmp_dir,
+               owner = params.hbase_user,
+               mode=0775,
+               recursive = True,
+               recursive_permission = True
+    )
     set_uid(params.hbase_user, params.hbase_user_dirs)
     
 def set_uid(user, user_dirs):
@@ -106,16 +112,9 @@ def setup_hadoop_env():
     else:
       tc_owner = params.hdfs_user
 
-    Directory(params.hadoop_root_dir,
-              mode=0755
-    )
     Directory(params.hadoop_dir,
               mode=0755
     )
-    Directory(params.hadoop_data_dir,
-              owner=params.hdfs_user,
-              group=params.user_group
-    )
     if stackversion.find('Gluster') >= 0:
         Directory(params.hadoop_conf_empty_dir,
               recursive=True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase.py
index 381ec1c..ea99288 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/package/scripts/hbase.py
@@ -39,7 +39,8 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
   Directory (params.tmp_dir,
              owner = params.hbase_user,
              mode=0775,
-             recursive = True
+             recursive = True,
+             recursive_permission = True
   )
 
   Directory (params.local_dir,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py
index 3150bab..d432d88 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_datanode.py
@@ -29,6 +29,7 @@ def create_dirs(data_dir, params):
   """
   Directory(data_dir,
             recursive=True,
+            recursive_permission=True,
             mode=0755,
             owner=params.hdfs_user,
             group=params.user_group,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py
index 5e1116c..9f470a3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_namenode.py
@@ -117,7 +117,8 @@ def create_name_dirs(directories):
             mode=0755,
             owner=params.hdfs_user,
             group=params.user_group,
-            recursive=True
+            recursive=True,
+            recursive_permission=True
   )
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_snamenode.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_snamenode.py
index 54c90cb..c650c4d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_snamenode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs_snamenode.py
@@ -28,6 +28,7 @@ def snamenode(action=None, format=False):
   if action == "configure":
     Directory(params.fs_checkpoint_dir,
               recursive=True,
+              recursive_permission=True,
               mode=0755,
               owner=params.hdfs_user,
               group=params.user_group)

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/journalnode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/journalnode.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/journalnode.py
index 3da5d03..f664bcd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/journalnode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/journalnode.py
@@ -71,6 +71,7 @@ class JournalNode(Script):
 
     Directory(params.jn_edits_dir,
               recursive=True,
+              recursive_permission=True,
               owner=params.hdfs_user,
               group=params.user_group
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
index 3e8b71b..a760ab2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
@@ -128,12 +128,13 @@ def oozie_server_specific():
     not_if="ls {pid_file} >/dev/null 2>&1 && !(ps `cat {pid_file}` >/dev/null 2>&1)"
   )
   
-  oozie_server_directorties = [format("{oozie_home}/{oozie_tmp_dir}"), params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, os.path.abspath(os.path.join(params.oozie_data_dir, "..")), params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir]
+  oozie_server_directorties = [format("{oozie_home}/{oozie_tmp_dir}"), params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir]
   Directory( oozie_server_directorties,
     owner = params.oozie_user,
     group = params.user_group,
     mode = 0755,
-    recursive = True
+    recursive = True,
+    recursive_permission=True
   )
   
   Directory(params.oozie_libext_dir,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/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 c1bd382..2128687 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
@@ -117,8 +117,6 @@ hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar"
 yarn_pid_dir = status_params.yarn_pid_dir
 mapred_pid_dir = status_params.mapred_pid_dir
 
-yarn_data_dir = "/hadoop/yarn"
-
 mapred_log_dir = format("{mapred_log_dir_prefix}/{mapred_user}")
 yarn_log_dir = format("{yarn_log_dir_prefix}/{yarn_user}")
 mapred_job_summary_log = format("{mapred_log_dir_prefix}/{mapred_user}/hadoop-mapreduce.jobsummary.log")

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
index c8ed419..cf0d211 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/yarn.py
@@ -65,6 +65,7 @@ def yarn(name = None):
               owner=params.yarn_user,
               group=params.user_group,
               recursive=True,
+              recursive_permission=True,
               ignore_failures=True,
               mode=0775
               )
@@ -85,10 +86,6 @@ def yarn(name = None):
             recursive=True,
             ignore_failures=True,
   )
-  Directory(params.yarn_data_dir,
-            owner=params.yarn_user,
-            group=params.user_group
-  )
 
   XmlConfig("core-site.xml",
             conf_dir=params.hadoop_conf_dir,
@@ -142,7 +139,8 @@ def yarn(name = None):
     Directory(params.ats_leveldb_dir,
        owner=params.yarn_user,
        group=params.user_group,
-       recursive=True
+       recursive=True,
+       recursive_permission=True
     )
 
   File(params.rm_nodes_exclude_path,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
index 4f2bb1f..d03aaf7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/zookeeper.py
@@ -58,6 +58,7 @@ def zookeeper(type = None):
   Directory(params.zk_data_dir,
             owner=params.zk_user,
             recursive=True,
+            recursive_permission=True,
             group=params.user_group
   )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
index 6d046fe..a903e5c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py
@@ -68,7 +68,8 @@ def falcon(type, action = None):
                 owner=params.falcon_user,
                 group=params.user_group,
                 mode=0775,
-                recursive=True
+                recursive=True,
+                recursive_permission=True
       )
 
     if params.falcon_graph_serialize_path:
@@ -76,7 +77,8 @@ def falcon(type, action = None):
                 owner=params.falcon_user,
                 group=params.user_group,
                 mode=0775,
-                recursive=True
+                recursive=True,
+                recursive_permission=True
       )
 
   if type == 'server':
@@ -95,7 +97,8 @@ def falcon(type, action = None):
       params.HdfsDirectory(None, action="create")
       Directory(params.falcon_local_dir,
                 owner=params.falcon_user,
-                recursive=True
+                recursive=True,
+                recursive_permission=True
       )
       if params.falcon_embeddedmq_enabled == True:
         Directory(os.path.abspath(os.path.join(params.falcon_embeddedmq_data, "..")),

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
index fbc29d2..3b71751 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
@@ -35,7 +35,8 @@ def storm():
   Directory([params.pid_dir, params.local_dir, params.conf_dir],
             owner=params.storm_user,
             group=params.user_group,
-            recursive=True
+            recursive=True,
+            recursive_permission=True
   )
 
   File(format("{conf_dir}/config.yaml"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index 94452fd..e1d52c5 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -42,6 +42,7 @@ class TestHBaseClient(RMFTestCase):
       owner = 'hbase',
       mode=0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',
@@ -123,6 +124,7 @@ class TestHBaseClient(RMFTestCase):
       owner = 'hbase',
       mode=0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index 0b387db..0a8c874 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -184,6 +184,7 @@ class TestHBaseMaster(RMFTestCase):
       owner = 'hbase',
       mode = 0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',
@@ -293,6 +294,7 @@ class TestHBaseMaster(RMFTestCase):
       owner = 'hbase',
       mode = 0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
index e84230e..193a0d7 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
@@ -117,6 +117,7 @@ class TestHbaseRegionServer(RMFTestCase):
       owner = 'hbase',
       mode=0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',
@@ -226,6 +227,7 @@ class TestHbaseRegionServer(RMFTestCase):
       owner = 'hbase',
       mode=0775,
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/hbase/local',
       owner = 'hbase',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index 18cb30d..e661f2c 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -368,6 +368,7 @@ class TestDatanode(RMFTestCase):
                               group = 'hadoop',
                               mode = 0755,
                               recursive = True,
+                              recursive_permission = True
                               )
 
   def assert_configure_secured(self):
@@ -413,4 +414,5 @@ class TestDatanode(RMFTestCase):
                               group = 'hadoop',
                               mode = 0755,
                               recursive = True,
+                              recursive_permission = True
                               )

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
index 8453d20..3fdd412 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
@@ -160,6 +160,7 @@ class TestJournalnode(RMFTestCase):
                               owner = 'hdfs',
                               group = 'hadoop',
                               recursive = True,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/etc/security/limits.d',
                               owner = 'root',
@@ -197,6 +198,7 @@ class TestJournalnode(RMFTestCase):
                               owner = 'hdfs',
                               group = 'hadoop',
                               recursive = True,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/etc/security/limits.d',
                               owner = 'root',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index 1d83b61..3986e68 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -528,6 +528,7 @@ class TestNamenode(RMFTestCase):
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
 
   def assert_configure_secured(self):
@@ -566,6 +567,7 @@ class TestNamenode(RMFTestCase):
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
 
   @patch("resource_management.libraries.script.Script.put_structured_out")

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py
index 53cffe1..937687d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_snamenode.py
@@ -221,6 +221,7 @@ class TestSNamenode(RMFTestCase):
                               group = 'hadoop',
                               mode = 0755,
                               recursive = True,
+                              recursive_permission = True
                               )
 
   def assert_configure_secured(self):
@@ -259,4 +260,5 @@ class TestSNamenode(RMFTestCase):
                               group = 'hadoop',
                               mode = 0755,
                               recursive = True,
+                              recursive_permission = True
                               )

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index c85b060..dd768e2 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -187,60 +187,63 @@ class TestOozieServer(RMFTestCase):
         group = 'hadoop',
         recursive = True,
         mode = 0755,
+        recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/var/run/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/log/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/tmp/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
-                              )
-    self.assertResourceCalled('Directory', '/hadoop/oozie',
-                              owner = 'oozie',
-                              group = 'hadoop',
-                              recursive = True,
-                              mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/hadoop/oozie/data',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server/webapps/',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server/conf',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/usr/lib/oozie/libext',
         recursive = True,
@@ -337,60 +340,63 @@ class TestOozieServer(RMFTestCase):
         group = 'hadoop',
         recursive = True,
         mode = 0755,
+        recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/var/run/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/log/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/tmp/oozie',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
-                              )
-    self.assertResourceCalled('Directory', '/hadoop/oozie',
-                              owner = 'oozie',
-                              group = 'hadoop',
-                              recursive = True,
-                              mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/hadoop/oozie/data',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server/webapps/',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server/conf',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/var/lib/oozie/oozie-server',
                               owner = 'oozie',
                               group = 'hadoop',
                               recursive = True,
                               mode = 0755,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/usr/lib/oozie/libext',
         recursive = True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
index a63ecb5..b759de6 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
@@ -219,10 +219,6 @@ class TestHistoryServer(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -415,10 +411,6 @@ class TestHistoryServer(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
index 868f22c..0c793c8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
@@ -74,10 +74,6 @@ class TestMapReduce2Client(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -211,10 +207,6 @@ class TestMapReduce2Client(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
index 65e26a4..44a9bad 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
@@ -182,27 +182,31 @@ class TestNodeManager(RMFTestCase):
                               mode = 0775,
                               recursive = True,
                               ignore_failures = True,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/hadoop/yarn/local1',
                               owner = 'yarn',
                               recursive = True,
                               group = 'hadoop',
                               ignore_failures = True,
-                              mode = 0775
+                              mode = 0775,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/hadoop/yarn/log',
                               owner = 'yarn',
                               group = 'hadoop',
                               recursive = True,
                               ignore_failures = True,
-                              mode = 0775
+                              mode = 0775,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/hadoop/yarn/log1',
                               owner = 'yarn',
                               group = 'hadoop',
                               recursive = True,
                               ignore_failures = True,
-                              mode = 0775
+                              mode = 0775,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/var/run/hadoop-yarn',
       owner = 'yarn',
@@ -244,10 +248,6 @@ class TestNodeManager(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -405,14 +405,16 @@ class TestNodeManager(RMFTestCase):
                               group = 'hadoop',
                               recursive = True,
                               ignore_failures = True,
-                              mode = 0775
+                              mode = 0775,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/hadoop/yarn/log',
                               owner = 'yarn',
                               group = 'hadoop',
                               recursive = True,
                               ignore_failures = True,
-                              mode = 0775
+                              mode = 0775,
+                              recursive_permission=True
                               )
     self.assertResourceCalled('Directory', '/var/run/hadoop-yarn',
       owner = 'yarn',
@@ -454,10 +456,6 @@ class TestNodeManager(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
index da4352a..e1b8132 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
@@ -189,10 +189,6 @@ class TestResourceManager(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -324,10 +320,6 @@ class TestResourceManager(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
index 9e7b9ae..39e5b8d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
@@ -75,10 +75,6 @@ class TestYarnClient(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -212,10 +208,6 @@ class TestYarnClient(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',
@@ -366,10 +358,6 @@ class TestYarnClient(RMFTestCase):
       recursive = True,
       ignore_failures = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-      owner = 'yarn',
-      group = 'hadoop'
-    )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
       owner = 'hdfs',
       group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
index d04c488..372afe0 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
@@ -64,6 +64,7 @@ class TestZookeeperClient(RMFTestCase):
       owner = 'zookeeper',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File',
                               '/etc/zookeeper/conf/log4j.properties',
@@ -120,6 +121,7 @@ class TestZookeeperClient(RMFTestCase):
       owner = 'zookeeper',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File',
                               '/etc/zookeeper/conf/log4j.properties',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
index 2269c34..c626fb9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
@@ -133,6 +133,7 @@ class TestZookeeperServer(RMFTestCase):
       owner = 'zookeeper',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File', '/hadoop/zookeeper/myid',
       content = '1',
@@ -185,6 +186,7 @@ class TestZookeeperServer(RMFTestCase):
       owner = 'zookeeper',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File', '/hadoop/zookeeper/myid',
       content = '1',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
index d79fabf..988ab2d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
@@ -127,6 +127,12 @@ class TestHookBeforeInstall(RMFTestCase):
     self.assertResourceCalled('Execute', '/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa',
         not_if = 'test $(id -u ambari-qa) -gt 1000',
     )
+    self.assertResourceCalled('Directory', '/hadoop/hbase',
+        owner = 'hbase',
+        mode = 0775,
+        recursive = True,
+        recursive_permission = True
+    )
     self.assertResourceCalled('File', '/tmp/changeUid.sh',
         content = StaticFile('changeToSecureUid.sh'),
         mode = 0555,
@@ -134,16 +140,9 @@ class TestHookBeforeInstall(RMFTestCase):
     self.assertResourceCalled('Execute', '/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/hadoop/hbase',
         not_if = 'test $(id -u hbase) -gt 1000',
     )
-    self.assertResourceCalled('Directory', '/hadoop',
-        mode = 0755
-    )
     self.assertResourceCalled('Directory', '/etc/hadoop',
         mode = 0755
     )
-    self.assertResourceCalled('Directory', '/hadoop/hdfs',
-        owner = 'hdfs',
-        group = 'hadoop'
-    )
     self.assertResourceCalled('Directory', '/etc/hadoop/conf.empty',
         owner = 'hdfs',
         group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index c2f37d0..91e10b0 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -123,6 +123,7 @@ class TestFalconServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/hadoop/falcon',
                               owner = 'falcon',
                               recursive = True,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('Directory', '/hadoop/falcon/embeddedmq',
                               owner = 'falcon'

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
index c9f9d38..d9a2bc0 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
@@ -37,16 +37,19 @@ class TestStormBase(RMFTestCase):
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/storm',
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/etc/storm/conf',
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File', '/etc/storm/conf/config.yaml',
       owner = 'storm',
@@ -76,16 +79,19 @@ class TestStormBase(RMFTestCase):
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/hadoop/storm',
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('Directory', '/etc/storm/conf',
       owner = 'storm',
       group = 'hadoop',
       recursive = True,
+      recursive_permission = True
     )
     self.assertResourceCalled('File', '/etc/storm/conf/config.yaml',
       owner = 'storm',

http://git-wip-us.apache.org/repos/asf/ambari/blob/12ac2945/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
index d85d477..4da558a 100644
--- a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
+++ b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
@@ -115,10 +115,6 @@ class TestAppTimelineServer(RMFTestCase):
                               recursive = True,
                               ignore_failures = True,
                               )
-    self.assertResourceCalled('Directory', '/hadoop/yarn',
-                              owner = 'yarn',
-                              group = 'hadoop'
-                              )
     self.assertResourceCalled('XmlConfig', 'core-site.xml',
                               owner = 'hdfs',
                               group = 'hadoop',
@@ -154,7 +150,8 @@ class TestAppTimelineServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/hadoop-yarn/timeline',
                               owner = 'yarn',
                               group = 'hadoop',
-                              recursive = True
+                              recursive = True,
+                              recursive_permission = True
                               )
     self.assertResourceCalled('File', '/etc/hadoop/conf/yarn.exclude',
                               owner = 'yarn',


Mime
View raw message