Skip to content

Commit

Permalink
Updated attributes for Erland VM. Created lager attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
densone committed Dec 2, 2011
1 parent 0d71606 commit 4ef7fed
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
2 changes: 2 additions & 0 deletions attributes/erlang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
default.riak.erlang.cookie = "riak"
default.riak.erlang.kernel_polling = true
default.riak.erlang.async_threads = 64
default.riak.erlang.error_logger_warnings = :w
default.riak.erlang.smp = "enable"
default.riak.erlang.env_vars.ERL_MAX_PORTS = 4096
default.riak.erlang.env_vars.ERL_FULLSWEEP_AFTER = 0
default.riak.erlang.env_vars.ERL_CRASH_DUMP = "/var/log/riak/erl_crash.dump"
35 changes: 35 additions & 0 deletions attributes/lager.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Author:: Sean Carey (<densone@basho.com>)
# Cookbook Name:: riak
#
# Copyright (c) 2010 Basho Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

default.riak.lager.handlers.lager_console_backend = :info
default.riak.lager.crash_log = "/var/log/riak/crash.log"
default.riak.lager.crash_log_date = "$D0"
default.riak.lager.crash_log_msg_size = 65536
default.riak.lager.crash_log_size = 10485760
default.riak.lager.error_logger_redirect = true


#{handlers, [
# {lager_console_backend, info},
# {lager_file_backend, [
# {"{{platform_log_dir}}/error.log", error, 10485760, "$D0", 5},
# {"{{platform_log_dir}}/console.log", info, 10485760, "$D0", 5}
# ]}
#]},

1 change: 0 additions & 1 deletion attributes/riak_control.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
#
# Author:: Sean Carey (<densone@basho.com>)
# Cookbook Name:: riak
Expand Down
2 changes: 1 addition & 1 deletion libraries/riak_template_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def prepare_app_config(riak)
riak.delete('bitcask')
end

#riak['riak_control']['userlist'] = Tuple.new(['userlist', riak['riak_control']['userlist']])
riak['riak_core']['default_bucket_props']['chash_keyfun'] = Tuple.new(riak['riak_core']['default_bucket_props']['chash_keyfun'].map {|i| i.to_sym }) if riak['riak_core']['default_bucket_props'] && riak['riak_core']['default_bucket_props']['chash_keyfun']

riak['riak_core']['default_bucket_props']['linkfun'] = Tuple.new(riak['riak_core']['default_bucket_props']['linkfun'].map {|i| i.to_sym }) if riak['riak_core']['default_bucket_props'] && riak['riak_core']['default_bucket_props']['linkfun']
Expand Down Expand Up @@ -121,6 +120,7 @@ def prepare_app_config(riak)
"heart" => "-heart",
"kernel_polling" => "+K",
"async_threads" => "+A",
"error_logger_warnings" => "+W",
"smp" => "-smp",
"env_vars" => "-env"
}
Expand Down
7 changes: 7 additions & 0 deletions recipes/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
node.riak.kernel.delete(:inet_dist_listen_max)
end

#erlang error logger warnings
node.riak.erlang.error_logger_warnings = (node.riak.erlang.error_logger_warnings).to_s.to_sym

# lager. rb
node.riak.lager.handlers.lager_console_backend = (node.riak.lager.handlers.lager_console_backend).to_s.to_sym

# kv.rb
node.riak.kv.storage_backend = (node.riak.kv.storage_backend).to_s.to_sym

Expand All @@ -48,6 +54,7 @@
# sasl.rb
node.riak.sasl.errlog_type = (node.riak.sasl.errlog_type).to_s.to_sym


case node.riak.kv.storage_backend
when :riak_kv_bitcask_backend # bitcask.rb
node.riak.delete(:innostore)
Expand Down

0 comments on commit 4ef7fed

Please sign in to comment.