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

uninitialized constant Puppet::ModuleTool::ModulefileReader #296

Closed
ball-hayden opened this issue May 4, 2015 · 5 comments
Closed

uninitialized constant Puppet::ModuleTool::ModulefileReader #296

ball-hayden opened this issue May 4, 2015 · 5 comments

Comments

@ball-hayden
Copy link

With:

librarian-puppet (2.1.0)
librarianp (0.6.2)
puppet (4.0.0)
puppet_forge (1.0.4)

I'm getting the following if I have a module that is from a git ref.

hayden@redpike:~/development/SparkSeat/Vagrant/provision/puppet$ bundle exec librarian-puppet update
/home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:89:in `evaluate_modulefile': uninitialized constant Puppet::ModuleTool::ModulefileReader (NameError)
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:112:in `parsed_metadata'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:62:in `module_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:34:in `fetch_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:93:in `fetch_version!'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:85:in `fetched_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:24:in `version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:69:in `satisfies?'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/dependency.rb:159:in `satisfied_by?'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/resolver/implementation.rb:110:in `block in check_manifest'
...

For reference, my puppetfile:

forge 'https://forgeapi.puppetlabs.com'

mod 'puppetlabs/concat'
mod 'puppetlabs/ntp'
mod 'puppetlabs/mysql'
mod 'maestrodev/rvm'
mod 'puppetlabs/nodejs'
mod 'saz/timezone'
mod 'luxflux/openvpn', git: 'git@github.com:luxflux/puppet-openvpn.git', ref: '2.8.0'
mod 'example42/resolver', git: 'git@github.com:example42/puppet-resolver.git', ref: 'd95fe58'
mod 'stankevich/python'
mod 'puppetlabs/firewall'
mod 'thias/sysctl'
mod 'rodjek/logrotate'

Thank you for your time.

@ball-hayden
Copy link
Author

Just to add:

I have come across this again today when I tried with:

mod 'rodjek/logrotate', git: 'git@github.com:rodjek/puppet-logrotate.git', ref: 'd569bc'

For completeness, here is the (abridged) output of librarian-puppet update --verbose

[Librarian] Resolving rodjek-logrotate (>= 0) <git@github.com:rodjek/puppet-logrotate.git#d569bc>
[Librarian]   Checking manifests
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --> origin
[Librarian]     -->   origin/HEAD -> origin/master
[Librarian]     -->   origin/master
[Librarian]     --> d569bcee1b43fa1af816c21afb5664d8e5235553
[Librarian]     --> d569bcee1b43fa1af816c21afb5664d8e5235553
/home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:89:in `evaluate_modulefile': uninitialized constant Puppet::ModuleTool::ModulefileReader (NameError)
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:112:in `parsed_metadata'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:62:in `module_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarian-puppet-2.1.0/lib/librarian/puppet/source/local.rb:34:in `fetch_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:93:in `fetch_version!'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:85:in `fetched_version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:24:in `version'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/manifest.rb:20:in `to_s'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/resolver/implementation.rb:191:in `block in scope_checking_manifest'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/resolver/implementation.rb:236:in `block in debug'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/logger.rb:37:in `block in debug'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/ui.rb:32:in `debug'
    from /home/hayden/development/SparkSeat/Vagrant/bundle/ruby/2.2.0/gems/librarianp-0.6.2/lib/librarian/logger.rb:37:in `debug'

@ball-hayden
Copy link
Author

Further research shows that Modulefiles are deprecated, and that ModulefileReader has been dropped from the Puppet API (hence the error).

I guess this means it is less of a bug in librarian-puppet, although a warning might be nice?

@jamescarr
Copy link

ugh... annoying. What is the specific version of the puppet gem we need to use here!?

@carlossg
Copy link
Collaborator

This is a problem with puppet 4 when your dependencies have no metadata.json and a Modulefile. Downgrading puppet to 3.x will work.

In the meantime the branch puppet4 is trying to fix the issue, but not yet finished

@carlossg
Copy link
Collaborator

Fixed in 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants