Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find scope for mongodb::params #428

Closed
pschichtel opened this issue Dec 10, 2017 · 8 comments
Closed

Could not find scope for mongodb::params #428

pschichtel opened this issue Dec 10, 2017 · 8 comments
Labels
bug Something isn't working

Comments

@pschichtel
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.1
  • Ruby: 2.1.9p490 (puppet bundled)
  • Distribution: Debian Jessie 8.10
  • Module version: 1.1.0

How to reproduce (e.g Puppet code you use)

enable manage_package_repo in globals.pp

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not find scope for mongodb::params at /etc/puppetlabs/code/environments/production/modules/mongodb/manifests/globals.pp:47:5 on node host

What behaviour did you expect instead

I expected the apt source list to be created by puppet.

Output log

see above

Any additional information you'd like to impart

n/a

@alexjfisher
Copy link
Member

@pschichtel Thanks for reporting this. Could you share a complete example of how you're using this module? It looks like there may be some sort of circular inheritance going on. Very, very similar to this postgresql module bug report.

@alexjfisher
Copy link
Member

The fix in postgresql module is puppetlabs/puppetlabs-postgresql@1507123

@alexjfisher alexjfisher added the bug Something isn't working label Dec 10, 2017
@pschichtel
Copy link
Author

it is just:

include ::mongodb::server
include ::mongodb::client

with the following hiera keys:

mongodb::globals::manage_package_repo: true
mongodb::globals::manage_package: true
mongodb::server::auth: false
mongodb::server::bind_ip: '0.0.0.0'
mongodb::server::storage_engine: 'wiredTiger'

@pschichtel
Copy link
Author

pschichtel commented Dec 10, 2017

Setting manage_package_repo to false will solve/hide the problem.

@pschichtel
Copy link
Author

This happens with puppet 5.3.3 as well

@pschichtel
Copy link
Author

I have still the exact same problem.

ekohl added a commit to ekohl/puppet-mongodb that referenced this issue Jun 25, 2018
mongodb::globals includes mongodb::repo
mongodb::repo inherits from mongodb::params
mongodb::params inherits from globals

We work around this by removing the inheritance from mongodb::repo and
requiring explicit parameters. We then pass in the parameters explicitly
in mongodb::globals. Since repo is a private class this shouldn't be
considered breaking an API. While we're at it we add types to the
parameters we change.

Fixes voxpupuli#428
@ekohl
Copy link
Member

ekohl commented Jun 25, 2018

@pschichtel could you test #474 and see if it fixes your issue?

@pschichtel
Copy link
Author

pschichtel commented Jun 26, 2018

@ekohl the dependency problem is gone, but APT is telling me the repo isn't signed which seems wrong. I guess the issue reported here is fixed then.

ekohl added a commit to ekohl/puppet-mongodb that referenced this issue Jun 28, 2018
mongodb::globals includes mongodb::repo
mongodb::repo inherits from mongodb::params
mongodb::params inherits from globals

We work around this by removing the inheritance from mongodb::repo and
requiring explicit parameters. We then pass in the parameters explicitly
in mongodb::globals. Since repo is a private class this shouldn't be
considered breaking an API. While we're at it we add types to the
parameters we change.

Fixes voxpupuli#428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants