Created
December 6, 2011 21:53
-
-
Save brennancheung/1440182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cookbooks/mongodb_sharding/recipes/configure.rb b/cookbooks/mongodb_sharding/recipes/configure.rb | |
index 8f07f05..9c10ee2 100644 | |
--- a/cookbooks/mongodb_sharding/recipes/configure.rb | |
+++ b/cookbooks/mongodb_sharding/recipes/configure.rb | |
@@ -30,7 +30,8 @@ roles.each do |role, params| | |
Chef::Log.debug("running role #{role} with params #{params.inspect}") | |
role = role.to_s | |
mongo_data = @node[:mongo_base] + "/data_#{role}" | |
- mongo_log = @node[:mongo_base] + "/log_#{role}" | |
+ #mongo_log = @node[:mongo_base] + "/log_#{role}" | |
+ mongo_log = "/mnt/mongodb/log_#{role}" | |
mongo_run = "/var/run/mongodb_#{role}" | |
mongo_logrotate = "/etc/logrotate.d/mongodb_#{role}" | |
diff --git a/cookbooks/mongodb_sharding/templates/default/mongodb.init.erb b/cookbooks/mongodb_sharding/templates/default/mongodb.init.erb | |
index 2eeb6c8..7888a57 100644 | |
--- a/cookbooks/mongodb_sharding/templates/default/mongodb.init.erb | |
+++ b/cookbooks/mongodb_sharding/templates/default/mongodb.init.erb | |
@@ -29,7 +29,7 @@ start() { | |
<% unless @role == 'mongos' %> | |
args="--dbpath $MONGODB_DATA --port $MONGODB_PORT --bind_ip $MONGODB_IP" | |
- args="${args} --logpath $MONGODB_LOG --logappend $MONGODB_OPTIONS" | |
+ args="${args} --logappend $MONGODB_OPTIONS" | |
<% end %> | |
<% if @role == 'rs' %> | |
args="${args} --replSet <%=replica_set_name%>" | |
@@ -41,6 +41,7 @@ start() { | |
<% if @role == 'config' %> | |
args="${args} --configsvr" | |
<% end %> | |
+ args = "${args} --logpath $MONGODB_LOG" | |
start-stop-daemon --background --start --chuid ${MONGODB_USER} --pidfile \ | |
"${MONGODB_PID_FILE}" --make-pidfile --exec ${MONGODB_EXEC} \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment