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/b9d19962 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b9d19962 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b9d19962 Branch: refs/heads/branch-dev-logsearch Commit: b9d199620a2691eff72497b3c02459d31e05eb08 Parents: b2f560a Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Mar 6 16:13:55 2017 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Mar 6 16:13:55 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/b9d19962/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/b9d19962/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/b9d19962/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'),