This is an automated email from the ASF dual-hosted git repository.
aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2b73664 AMBARI-24902. ATS 1.5 does not start in DL cluster without
HDFS (aonishuk) (#2610)
2b73664 is described below
commit 2b7366441b37ddf0a2cb7acb41fa196553c27115
Author: aonishuk <[email protected]>
AuthorDate: Thu Nov 15 11:17:18 2018 +0200
AMBARI-24902. ATS 1.5 does not start in DL cluster without HDFS (aonishuk)
(#2610)
---
.../resources/stack-hooks/before-ANY/scripts/hook.py | 3 ++-
.../before-ANY/scripts/shared_initialization.py | 18 ++++++++++--------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git
a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
index 8b93f7b..02ce109 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
@@ -18,7 +18,7 @@ limitations under the License.
"""
-from shared_initialization import setup_users, setup_hadoop_env, setup_java
+from shared_initialization import setup_users, setup_hadoop_env, setup_java,
setup_env
from resource_management import Hook
@@ -31,6 +31,7 @@ class BeforeAnyHook(Hook):
setup_users()
if params.has_namenode or params.dfs_type == 'HCFS':
setup_hadoop_env()
+ setup_env()
setup_java()
diff --git
a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
index 27679e0..97a812f 100644
---
a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
+++
b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
@@ -194,14 +194,16 @@ def setup_hadoop_env():
File(os.path.join(params.hadoop_conf_dir, 'hadoop-env.sh'),
owner=tc_owner,
group=params.user_group,
content=InlineTemplate(params.hadoop_env_sh_template))
-
- # Create tmp dir for java.io.tmpdir
- # Handle a situation when /tmp is set to noexec
- Directory(params.hadoop_java_io_tmpdir,
- owner=params.hdfs_user,
- group=params.user_group,
- mode=01777
- )
+
+def setup_env():
+ import params
+ # Create tmp dir for java.io.tmpdir
+ # Handle a situation when /tmp is set to noexec
+ Directory(params.hadoop_java_io_tmpdir,
+ owner=params.hdfs_user if params.has_namenode else None,
+ group=params.user_group,
+ mode=01777
+ )
def setup_java():
"""