summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,