Skip to content

Commit

Permalink
Merge pull request #313 from deviantony/file-limit
Browse files Browse the repository at this point in the history
Added ulimit support
  • Loading branch information
cmurphy committed Feb 24, 2015
2 parents eb3d546 + 741aa81 commit 15e2421
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
14 changes: 11 additions & 3 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@
require => File['/etc/rabbitmq'],
}

if $::osfamily == 'Debian' {
file { '/etc/default/rabbitmq-server':
ensure => file,
content => template('rabbitmq/default.erb'),
mode => '0644',
owner => '0',
group => '0',
notify => Class['rabbitmq::service'],
}
}

if $config_cluster {

if $erlang_cookie == undef {
Expand All @@ -115,7 +126,4 @@
}
}
}


}

2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
$version = $rabbitmq::params::version,
$wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
$cluster_partition_handling = $rabbitmq::params::cluster_partition_handling,
$file_limit = $rabbitmq::params::file_limit,
$environment_variables = $rabbitmq::params::environment_variables,
$config_variables = $rabbitmq::params::config_variables,
$config_kernel_variables = $rabbitmq::params::config_kernel_variables,
Expand Down Expand Up @@ -93,6 +94,7 @@
validate_re($stomp_port, '\d+')
validate_bool($wipe_db_on_cookie_change)
validate_bool($tcp_keepalive)
validate_re($file_limit, '\d+')
# Validate service parameters.
validate_re($service_ensure, '^(running|stopped)$')
validate_bool($service_manage)
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,5 @@
$environment_variables = {}
$config_variables = {}
$config_kernel_variables = {}
$file_limit = 16384
}
10 changes: 10 additions & 0 deletions templates/default.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# File managed by Puppet.

# This file is sourced by /etc/init.d/rabbitmq-server. Its primary
# reason for existing is to allow adjustment of system limits for the
# rabbitmq-server process.
#
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
ulimit -n <%= @file_limit %>

0 comments on commit 15e2421

Please sign in to comment.