Issue #4142 has been updated by Matt Robinson.
Even though this was marked as closed, it was still driving me insane since the module tool generates a metadata.json file with an empty hash for every module. This makes it a royal pain to use module repos that have checked this file in, so I've modified puppet not to blow up when the metadata hash is empty. Nick reviewed the code, I verified it worked with the modules that were failing for me, and I ran the basic idea by Jeff for soundness. It's now merged. commit:45b3908e03734388b6c699ffbc4223f43b44a1d5 ---------------------------------------- Bug #4142: puppet fails when metadata.json exists in module https://projects.puppetlabs.com/issues/4142 Author: Dan Bode Status: Closed Priority: High Assignee: Category: modules Target version: 2.6.5 Affected Puppet version: 2.6.0 Keywords: Branch: https://github.com/jamtur01/puppet/tree/tickets/2.6.x/4142 when I tried to run the developerbootstrap module, I ran into the following error: <pre> puppet tests/init.pp uninitialized constant Puppet::Module::JSON at /usr/local/dev/puppet-dev/puppetlabs-developerbootstrap-0.0.5/tests/init.pp:1 on node puppet2.localdomain [root@puppet2 tests]# puppet init.pp --trace /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:112:in `load_metadata' /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:59:in `initialize' /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:81:in `new' /usr/lib/ruby/site_ruby/1.8/puppet/node/environment.rb:81:in `module' /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:34:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/parser/files.rb:20:in `find_manifests' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:45:in `import' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:82:in `load_until' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:140:in `import_if_possible' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:81:in `load_until' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:79:in `each' /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:79:in `load_until' /usr/lib/ruby/site_ruby/1.8/puppet/resource/type_collection.rb:134:in `find_or_load' /usr/lib/ruby/site_ruby/1.8/puppet/resource/type_collection.rb:142:in `find_hostclass' /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb:119:in `find_hostclass' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:150:in `evaluate_classes' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:148:in `each' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:148:in `evaluate_classes' /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/include.rb:6:in `function_include' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:40:in `send' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/function.rb:40:in `evaluate' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:72:in `safeevaluate' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:35:in `evaluate' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:34:in `collect' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/astarray.rb:34:in `evaluate' /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:72:in `safeevaluate' /usr/lib/ruby/site_ruby/1.8/puppet/resource/type.rb:76:in `evaluate_code' /usr/lib/ruby/site_ruby/1.8/puppet/parser/resource.rb:74:in `evaluate' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:311:in `evaluate_main' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:101:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:18:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:79:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:184:in `benchmark' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:202:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:51:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:114:in `main' /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:35:in `run_command' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:403:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:52:in `execute' /usr/bin/puppet:73 /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:21:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:79:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:184:in `benchmark' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in `compile' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:202:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:51:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:114:in `main' /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:35:in `run_command' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:403:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:52:in `execute' /usr/bin/puppet:73 uninitialized constant Puppet::Module::JSON at /usr/local/dev/puppet-dev/puppetlabs-developerbootstrap-0.0.5/tests/init.pp:1 on node puppet2.localdomain </pre> I can get around the error by removing the metadata.json file. I verified the issue also occurs with other modules. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
