Skip to content

Commit

Permalink
Bring sysctl cookbook back
Browse files Browse the repository at this point in the history
There seems to be a race condition on boot when PG is sometimes started before
shmmax kernel parameter is set. Maybe 30-level is too late, but we can afford
to replace /etc/sysctl.conf for Travis Vagrant VMs anyway.
  • Loading branch information
michaelklishin committed Jul 5, 2011
1 parent 5b40adf commit 1195cda
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vagrant_base/sysctl/attributes/default.rb
@@ -0,0 +1,4 @@
# 64 MB
default[:sysctl][:kernel_shmall] = 67108864
# 64 MB
default[:sysctl][:kernel_shmmax] = 67108864
6 changes: 6 additions & 0 deletions vagrant_base/sysctl/recipes/default.rb
@@ -0,0 +1,6 @@
template "/etc/sysctl.conf" do
source "sysctl.conf.erb"
owner "root"
group "root"
mode 0644
end
2 changes: 2 additions & 0 deletions vagrant_base/sysctl/templates/default/sysctl.conf.erb
@@ -0,0 +1,2 @@
kernel.shmall=<%= node[:sysctl][:kernel_shmall] %>
kernel.shmmax=<%= node[:sysctl][:kernel_shmmax] %>

0 comments on commit 1195cda

Please sign in to comment.