You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
229: notifies :create, 'ruby_block[config_sharding]', :immediately if new_resource.is_mongos && new_r
esource.auto_configure_sharding
230: # we don't care about a running mongodb service in these cases, all we need is stopping it
231: ignore_failure true if new_resource.name == 'mongodb'
232: end
233:
234: # replicaset
235: if new_resource.is_replicaset && new_resource.auto_configure_replicaset
236>> rs_nodes = search(
237: :node,
238: "mongodb_cluster_name:#{new_resource.cluster_name} AND "
239: 'mongodb_is_replicaset:true AND '
240: "mongodb_config_mongod_replication_replSetName:#{new_resource.replicaset_name} AND "
241: "chef_environment:#{node.chef_environment}"
242: )
243:
244: ruby_block 'config_replicaset' do
245: block do
Platform:
x86_64-linux
What am I missing here? from where this cookbook is getting/generating the replicaset_name?
Any help will be appreciated.
Thanks,
Leo
The text was updated successfully, but these errors were encountered:
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Hello, I'm trying to configure a replica using the cookbook but it fails when autoconfigure is set to true giving me the following error message:
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/sc-mongodb/recipes/replicaset.rb
Net::HTTPServerException
400 "Bad Request"
Cookbook Trace:
/var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:236:in
block in from_file' /var/chef/cache/cookbooks/sc-mongodb/recipes/replicaset.rb:36:in
from_file'Relevant File Content:
/var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:
229: notifies :create, 'ruby_block[config_sharding]', :immediately if new_resource.is_mongos && new_r
esource.auto_configure_sharding
230: # we don't care about a running mongodb service in these cases, all we need is stopping it
231: ignore_failure true if new_resource.name == 'mongodb'
232: end
233:
234: # replicaset
235: if new_resource.is_replicaset && new_resource.auto_configure_replicaset
236>> rs_nodes = search(
237: :node,
238: "mongodb_cluster_name:#{new_resource.cluster_name} AND "
239: 'mongodb_is_replicaset:true AND '
240: "mongodb_config_mongod_replication_replSetName:#{new_resource.replicaset_name} AND "
241: "chef_environment:#{node.chef_environment}"
242: )
243:
244: ruby_block 'config_replicaset' do
245: block do
Platform:
x86_64-linux
What am I missing here? from where this cookbook is getting/generating the replicaset_name?
Any help will be appreciated.
Thanks,
Leo
The text was updated successfully, but these errors were encountered: