summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-03-20 10:25:08 -0700
committerGitHub <noreply@github.com>2020-03-20 10:25:08 -0700
commit236153f3d715b30f4b0af381bb05798154dc0574 (patch)
tree2407be37bd05c24dd02a3019bdacd08ccfdcfa27
parent1b1de44d711dde15a4468da2c600ba4292829448 (diff)
parent548b7213361c1e19bc06a22efa1944a2e0884e54 (diff)
downloadchef-236153f3d715b30f4b0af381bb05798154dc0574.tar.gz
Merge pull request #9516 from chef/ulimit_fix
Fix loading the template file in the user_ulimit resource
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/default.rb15
-rw-r--r--lib/chef/resource/user_ulimit.rb1
2 files changed, 16 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb
index eeccb9ffd7..8003f915f8 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb
@@ -117,6 +117,21 @@ end
end
end
+user_ulimit "tomcat" do
+ filehandle_soft_limit 8192
+ filehandle_hard_limit 8192
+ process_soft_limit 61504
+ process_hard_limit 61504
+ memory_limit 1024
+ core_limit 2048
+ core_soft_limit 1024
+ core_hard_limit "unlimited"
+ stack_soft_limit 2048
+ stack_hard_limit 2048
+ rtprio_soft_limit 60
+ rtprio_hard_limit 60
+end
+
include_recipe "::chef-vault" unless includes_recipe?("end_to_end::chef-vault")
include_recipe "::alternatives"
include_recipe "::tests"
diff --git a/lib/chef/resource/user_ulimit.rb b/lib/chef/resource/user_ulimit.rb
index 82be09cf74..df3a3dee4e 100644
--- a/lib/chef/resource/user_ulimit.rb
+++ b/lib/chef/resource/user_ulimit.rb
@@ -79,6 +79,7 @@ class Chef
action :create do
template "/etc/security/limits.d/#{new_resource.filename}" do
source ::File.expand_path("../support/ulimit.erb", __FILE__)
+ local true
mode "0644"
variables(
ulimit_user: new_resource.username,