Skip to content

Commit

Permalink
Best Practice - Force Chef to setup number of CPUs
Browse files Browse the repository at this point in the history
GOMAXPROCS picks up number of CPUs instead of leaving it as an attribute
  • Loading branch information
goncalopereira committed Oct 15, 2014
1 parent d451e81 commit 6204a44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,4 @@
# UI attributes
default['consul']['client_addr'] = '0.0.0.0'
default['consul']['ui_dir'] = '/var/lib/consul/ui'
default['consul']['serve_ui'] = false

#golang attributes - should use number of processors
default['consul']['gomaxprocs'] = 2
default['consul']['serve_ui'] = false
2 changes: 1 addition & 1 deletion recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
source 'consul-sysconfig.erb'
mode 0755
variables(
gomaxprocs: node['consul']['gomaxprocs']
gomaxprocs: node['cpu']['total']
)
notifies :restart, 'service[consul]', :immediately
end
Expand Down

0 comments on commit 6204a44

Please sign in to comment.