- From: Brad Knowles <
>
- To:
- Cc: Brad Knowles <
>
- Subject: [chef] Re: New Community Cookbook: MongoDB
- Date: Thu, 15 Sep 2011 19:30:48 -0500
On Sep 6, 2011, at 9:44 AM, Miquel Torres wrote:
>
We have put a tutorial on the wiki describing the setup of a full
>
sharded and replicated cluster:
>
https://github.com/edelight/cookbooks/wiki/MongoDB%3A-Replication%2BSharding
>
>
There are some things that could still be improved, but we are pretty
>
happy with it as-is.
We've looked at the tutorial page that you've got, but we're trying to modify
this cookbook to work on CentOS 5.6, and we're running into some problems.
In cookbooks/mongodb/definitions/mongodb.rb, starting at line 140, we have
this code:
# replicaset
if !replicaset_name.nil?
rs_nodes = search(
:node,
"mongodb_cluster_name:#{replicaset['mongodb']['cluster_name']} AND \
recipes:mongodb\\:\\:replicaset AND \
mongodb_shard_name:#{replicaset['mongodb']['shard_name']} AND \
chef_environment:#{replicaset.chef_environment}"
)
However, this search is returning null for us. We confirmed this by adding
the following logging statement:
Chef::Log.info("mongodb:rs_nodes:#{rs_nodes}")
The result is a chef-client run that looks like this:
173-203-195-99.static.cloud-ips.com [Thu, 15 Sep 2011 23:43:43 +0000] WARN:
We are not using a configfile, as the daemons can be configured via
commandline
173-203-195-99.static.cloud-ips.com [Thu, 15 Sep 2011 23:43:43 +0000] WARN:
We are not using a configfile, as the daemons can be configured via
commandline
173-203-195-99.static.cloud-ips.com [Thu, 15 Sep 2011 23:43:44 +0000] INFO:
mongodb:rs_nodes:[]
173-203-195-99.static.cloud-ips.com [Thu, 15 Sep 2011 23:43:44 +0000] INFO:
Processing gem_package[mongo] action install (mongodb::default line 34)
We're having trouble figuring out why this search would be returning null,
and our forays with Shef and all of our other testing so far have not been
very enlightening.
I tried posting this as a comment at
<
http://community.opscode.com/cookbooks/mongodb>, but all the formatting was
destroyed in that message, and there doesn't seem to be any way that I can
delete a comment that I had made.
I don't suppose you have any hints or comments? Thanks!
--
Brad Knowles
<
>
Archive powered by MHonArc 2.6.16.