Repository: ambari Updated Branches: refs/heads/branch-2.2 545265f7c -> 1e8da1a5a
AMBARI-15531. Hiveserver2 goes down on HA cluster deployed via blueprint. (Laszlo Puskas via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e8da1a5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e8da1a5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e8da1a5 Branch: refs/heads/branch-2.2 Commit: 1e8da1a5a3ba772ea8e660529576cf0ab3dac8d6 Parents: 545265f Author: Toader, Sebastian <stoa...@hortonworks.com> Authored: Fri Mar 25 06:24:59 2016 +0100 Committer: Toader, Sebastian <stoa...@hortonworks.com> Committed: Fri Mar 25 06:24:59 2016 +0100 ---------------------------------------------------------------------- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 12 +++++-- .../stacks/2.0.6/YARN/test_historyserver.py | 38 ++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e8da1a5/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index 05e19cf..bb2f567 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -20,7 +20,6 @@ Ambari Agent """ from resource_management import * -import sys import os from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from ambari_commons import OSConst @@ -71,7 +70,16 @@ def yarn(name = None): mode=0777, recursive_chmod=True ) - + + # create the /tmp folder with proper permissions if it doesn't exist yet + if params.entity_file_history_directory.startswith('/tmp'): + params.HdfsResource('/tmp', + action="create_on_execute", + type="directory", + owner=params.yarn_user, + group=params.user_group, + mode=0777 + ) params.HdfsResource(params.entity_file_history_directory, action="create_on_execute", http://git-wip-us.apache.org/repos/asf/ambari/blob/1e8da1a5/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 b1634d0..080bc11 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 @@ -213,6 +213,25 @@ class TestHistoryServer(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', mode = 0777, ) + self.assertResourceCalled('HdfsResource', '/tmp', + immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, + security_enabled = False, + hadoop_bin_dir = '/usr/bin', + keytab = UnknownConfigurationMock(), + default_fs = 'hdfs://c6401.ambari.apache.org:8020', + hdfs_site = self.getConfig()['configurations']['hdfs-site'], + kinit_path_local = '/usr/bin/kinit', + principal_name = UnknownConfigurationMock(), + user = 'hdfs', + dfs_type = '', + owner = 'yarn', + group = 'hadoop', + hadoop_conf_dir = '/etc/hadoop/conf', + type = 'directory', + action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', + mode = 0777 + ) + self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, security_enabled = False, @@ -467,6 +486,25 @@ class TestHistoryServer(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='hdfs', default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) + + self.assertResourceCalled('HdfsResource', '/tmp', + immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, + security_enabled = True, + hadoop_bin_dir = '/usr/bin', + keytab = '/etc/security/keytabs/hdfs.headless.keytab', + default_fs = 'hdfs://c6401.ambari.apache.org:8020', + hdfs_site = self.getConfig()['configurations']['hdfs-site'], + kinit_path_local = '/usr/bin/kinit', + principal_name = 'hdfs', + user = 'hdfs', + dfs_type = '', + owner = 'yarn', + group = 'hadoop', + hadoop_conf_dir = '/etc/hadoop/conf', + type = 'directory', + action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', + mode = 0777 + ) self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, security_enabled = True,