sc-mongodb icon indicating copy to clipboard operation
sc-mongodb copied to clipboard

Error executing action `run` on resource 'ruby_block[config_replicaset]'

Open heaven opened this issue 7 years ago • 3 comments

    NoMethodError
    -------------
    undefined method `[]' for nil:NilClass

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/sc-mongodb/libraries/mongodb.rb:74:in `configure_replicaset'
    /var/chef/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:246:in `block (3 levels) in from_file'

Looking at the source I see it approaches node['mongodb']['config']['net']['port'] but should be node['mongodb']['config']['mongod']['net']['port']

This breaks sc-mongodb::replicaset recipe

heaven avatar Jan 25 '18 13:01 heaven

I'm getting the same problem. Seems that attribute is undefined by default.

mike-stewart avatar Jan 31 '18 23:01 mike-stewart

Looks like this was fixed in #186 already

devsibwarra avatar Feb 01 '18 00:02 devsibwarra

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.

github-actions[bot] avatar Sep 30 '20 00:09 github-actions[bot]