You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/03/06 18:44:31 UTC
[18/25] ambari git commit: AMBARI-20318. ulimit config missing for
storm service (aonishuk)
AMBARI-20318. ulimit config missing for storm service (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d95dd6b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d95dd6b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d95dd6b
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 3d95dd6bf22f32dac55b72b639edf2709e253c9b
Parents: dbc12f2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Mar 6 16:13:50 2017 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Mar 6 16:13:50 2017 +0200
----------------------------------------------------------------------
.../STORM/0.9.1/package/scripts/params_linux.py | 2 ++
.../STORM/0.9.1/package/scripts/storm.py | 7 +++++++
.../src/test/python/stacks/2.1/STORM/test_storm_base.py | 12 ++++++++++++
3 files changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3d95dd6b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
index a176456..5d8a5f3 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
@@ -49,6 +49,8 @@ tmp_dir = Script.get_tmp_dir()
stack_root = status_params.stack_root
sudo = AMBARI_SUDO_BINARY
+limits_conf_dir = "/etc/security/limits.d"
+
# Needed since this is an Atlas Hook service.
cluster_name = config['clusterName']
http://git-wip-us.apache.org/repos/asf/ambari/blob/3d95dd6b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/storm.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/storm.py
index f02ced4..99579d2 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/storm.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/storm.py
@@ -79,6 +79,13 @@ def storm(name=None):
cd_access="a",
)
+ File(format("{limits_conf_dir}/storm.conf"),
+ owner='root',
+ group='root',
+ mode=0644,
+ content=Template("storm.conf.j2")
+ )
+
File(format("{conf_dir}/config.yaml"),
content=Template("config.yaml.j2"),
owner=params.storm_user,
http://git-wip-us.apache.org/repos/asf/ambari/blob/3d95dd6b/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 f3cac14..f2e05be 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
@@ -56,6 +56,12 @@ class TestStormBase(RMFTestCase):
create_parents = True,
cd_access='a'
)
+ self.assertResourceCalled('File', '/etc/security/limits.d/storm.conf',
+ content = Template('storm.conf.j2'),
+ owner = 'root',
+ group = 'root',
+ mode = 0644,
+ )
self.assertResourceCalled('File', confDir + '/config.yaml',
owner = 'storm',
content = Template('config.yaml.j2'),
@@ -100,6 +106,12 @@ class TestStormBase(RMFTestCase):
create_parents = True,
cd_access='a'
)
+ self.assertResourceCalled('File', '/etc/security/limits.d/storm.conf',
+ content = Template('storm.conf.j2'),
+ owner = 'root',
+ group = 'root',
+ mode = 0644,
+ )
self.assertResourceCalled('File', confDir + '/config.yaml',
owner = 'storm',
content = Template('config.yaml.j2'),