从 Puppet Labs YUM 存储库将节点升级到 Puppet 3.0.0 后,升级的节点会抛出一个 munging 错误:
[ashinn@dis1 ~]$ sudo puppet agent --test --trace 错误:无法在 [:main, :agent, :ssl] 部分创建用于管理 Puppet 文件和目录的资源:文件 [/var/lib/puppet/state/graphs] 上的参数路径失败:Munging failed for value "/var /lib/puppet/state/graphs" 在类路径中:未初始化常量 Puppet::FileCollection /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:62:in munge'unsafe_munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:209:in
/usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:252:in []='value=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:414:in
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1660:in initialize'set_name' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1647:in
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:434:in new'initialize' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in发送'to_ral' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in each'to_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in to_ral'to_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:475:in
/usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:891:in synchronize'use' /usr/lib/ruby/1.8/sync.rb:230:in
/usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:885:in setup'use' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:450:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in plugin_hook'run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in exit_on_fail'run' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in execute'run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in
/usr/bin/傀儡:10 错误:无法准备执行:无法在 [:main, :agent, :ssl] 部分创建用于管理 Puppet 文件和目录的资源:文件 [/var/lib/puppet/state/graphs] 上的参数路径失败:Munging类路径中的值“/var/lib/puppet/state/graphs”失败:未初始化的常量 Puppet::FileCollection 文件 [/var/lib/puppet/state/graphs] 上的参数路径失败:类路径中的值“/var/lib/puppet/state/graphs”的 Munging 失败:未初始化的常量 Puppet::FileCollection /usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:62:in munge'unsafe_munge' /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:209:in
/usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:252:in []='value=' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:414:in
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1660:in initialize'set_name' /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1647:in
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/file.rb:434:in new'initialize' /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:290:in发送'to_ral' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:570:in each'to_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:551:in to_ral'to_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:475:in
/usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:891:in synchronize'use' /usr/lib/ruby/1.8/sync.rb:230:in
/usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:885:in setup'use' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:450:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in plugin_hook'run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in exit_on_fail'run' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:344:in execute'run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in
/usr/bin/傀儡:10
我注意到/var/lib/puppet/state/graphs
每次尝试时报告的文件(在此错误中)都会更改。它似乎总是 /var/lib/puppet 中的一个随机文件。知道这里会发生什么吗?
看起来您正在选择 2.7.19 gem 和 RPM——“sudo gem list”是否显示已安装 Puppet gem?
根本原因是 puppet 现在支持从 gems 加载扩展的功能,请参阅https://projects.puppetlabs.com/issues/7788