Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Merge branch 'pr/380'
Browse files Browse the repository at this point in the history
  • Loading branch information
paulczar committed Dec 16, 2014
2 parents 9ff27cf + 74f58d3 commit 304e328
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ Style/WordArray:
MinSize: 5

Style/RedundantBegin:
Enabled: false
Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
Style/NumericLiterals:
MinDigits: 6
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.11.1
* MINOR - default logstash version 1.4.2
* MINOR - correct status code for initv scripts
* MINOR - parameterize open file limits for upstart method

## 0.11.0
* MAJOR - depreciate non runit service types.
Expand Down
3 changes: 3 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
default['logstash']['instance_default']['runit_run_template_name'] = 'logstash'
default['logstash']['instance_default']['runit_log_template_name'] = 'logstash'

default['logstash']['instance_default']['limit_nofile_soft'] = 65550
default['logstash']['instance_default']['limit_nofile_hard'] = 65550

# roles/flags for various autoconfig/discovery components
default['logstash']['instance_default']['enable_embedded_es'] = false
default['logstash']['instance_default']['bind_host_interface'] = ''
Expand Down
1 change: 1 addition & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
license 'Apache 2.0'
description 'Installs/Configures logstash'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))

version '0.11.1'

%w(ubuntu debian redhat centos scientific amazon fedora).each do |os|
Expand Down
10 changes: 8 additions & 2 deletions providers/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def load_current_resource
@supervisor_gid = Logstash.get_attribute_or_default(node, @instance, 'supervisor_gid')
@runit_run_template_name = Logstash.get_attribute_or_default(node, @instance, 'runit_run_template_name')
@runit_log_template_name = Logstash.get_attribute_or_default(node, @instance, 'runit_log_template_name')
@nofile_soft = Logstash.get_attribute_or_default(node, @instance, 'limit_nofile_soft')
@nofile_hard = Logstash.get_attribute_or_default(node, @instance, 'limit_nofile_hard')
end

action :restart do
Expand Down Expand Up @@ -112,7 +114,9 @@ def load_current_resource
log_file: svc[:log_file],
workers: svc[:workers],
supervisor_gid: svc[:supervisor_gid],
upstart_with_sudo: svc[:upstart_with_sudo]
upstart_with_sudo: svc[:upstart_with_sudo],
nofile_soft: svc[:nofile_soft],
nofile_hard: svc[:nofile_hard]
)
notifies :restart, "service[#{svc[:service_name]}]", :delayed
end
Expand Down Expand Up @@ -247,7 +251,9 @@ def svc_vars
supervisor_gid: @supervisor_gid,
templates_cookbook: @templates_cookbook,
runit_run_template_name: @runit_run_template_name,
runit_log_template_name: @runit_log_template_name
runit_log_template_name: @runit_log_template_name,
nofile_soft: @nofile_soft,
nofile_hard: @nofile_hard
}
svc
end
2 changes: 1 addition & 1 deletion templates/default/init/upstart/tarball.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stop on runlevel [!2345]

respawn
respawn limit 5 30
limit nofile 65550 65550
limit nofile <%= @nofile_soft %> <%= @nofile_hard %>

chdir <%= @home %>

Expand Down

0 comments on commit 304e328

Please sign in to comment.