After upgrading a node to Puppet 3.0.0 from the Puppet Labs YUM repository, the node that gets upgraded throws a munging error:
[ashinn@dis1 ~]$ sudo puppet agent --test --trace Error: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Parameter path failed on File[/var/lib/puppet/state/graphs]: Munging failed for value "/var/lib/puppet/state/graphs" in class path: uninitialized constant Puppet::FileCollection /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:62:inunsafe_munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:209:in
munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:252:invalue=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:414:in
[]=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1660:inset_name' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1647:in
initialize' /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:434:ininitialize' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in
new' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:into_ral' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in
send' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:into_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in
each' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:into_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:475:in
to_ral' /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:891:inuse' /usr/lib/ruby/1.8/sync.rb:230:in
synchronize' /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:885:inuse' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:450:in
setup' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in
plugin_hook' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in
exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in
execute' /usr/bin/puppet:10 Error: Could not prepare for execution: Could not create resources for managing Puppet's files and directories in sections [:main, :agent, :ssl]: Parameter path failed on File[/var/lib/puppet/state/graphs]: Munging failed for value "/var/lib/puppet/state/graphs" in class path: uninitialized constant Puppet::FileCollection Parameter path failed on File[/var/lib/puppet/state/graphs]: Munging failed for value "/var/lib/puppet/state/graphs" in class path: uninitialized constant Puppet::FileCollection /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:62:inunsafe_munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:209:in
munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:252:invalue=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:414:in
[]=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1660:inset_name' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1647:in
initialize' /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:434:ininitialize' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in
new' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:into_ral' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in
send' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:into_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in
each' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:into_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:475:in
to_ral' /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:891:inuse' /usr/lib/ruby/1.8/sync.rb:230:in
synchronize' /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:885:inuse' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:450:in
setup' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in
plugin_hook' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in
exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:inrun' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in
execute' /usr/bin/puppet:10
I noticed that the file reported (in this error /var/lib/puppet/state/graphs
) changes every time I try. It seems to always be a random file in /var/lib/puppet. Any idea what might be happening here?
Best Answer
Looks like you are picking up a 2.7.19 gem alongside the RPM -- does 'sudo gem list' show a Puppet gem installed?
The root cause of this is a feature where puppet now supports loading extensions from gems, see https://projects.puppetlabs.com/issues/7788