更新后,puppet-master/foreman“节点上的 nil:NilClass 未定义方法‘[]’”

更新后,puppet-master/foreman“节点上的 nil:NilClass 未定义方法‘[]’”

将我的 puppet-master 从 2.7 更新到 3.6.2 后,我在节点上运行 puppet 代理时收到以下消息:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `[]' for nil:NilClass on node fqdn

不幸的是我无法提供更多信息。我的 puppet-master 调试日志显示了以下内容:

Jul 11 17:53:40 handsoff puppet-master[6197]: Caching node for fqdn
Jul 11 17:53:40 handsoff puppet-master[6197]: undefined method `[]' for nil:NilClass on node fqdn
Jul 11 17:53:40 handsoff puppet-master[6197]: undefined method `[]' for nil:NilClass on node fqdn
Jul 11 17:53:40 handsoff puppet-master[6197]: undefined method `[]' for nil:NilClass on node fqdn

我正在运行以下版本的 Puppet 和 foreman:

# dpkg -l | grep foreman
ii  foreman                            1.5.1-1                       amd64        Systems management web interface
ii  foreman-installer                  1.5.1-1                       all          Automated puppet-based installer for The Foreman
ii  foreman-postgresql                 1.5.1-1                       all          metapackage providing PostgreSQL dependencies for Foreman
ii  foreman-proxy                      1.5.1-1                       all          RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii  ruby-foreman-api                   0.1.11-1                      all          Ruby bindings for Forman's rest API
ii  ruby-foreman-bootdisk              2.0.8                         all          Foreman Bootdisk Plugin
ii  ruby-foreman-setup                 2.0.4                         all          Foreman

# dpkg -l | grep puppet
ii  facter                             2.1.0-1puppetlabs1            amd64        Ruby module for collecting simple facts about a host operating system
ii  foreman-installer                  1.5.1-1                       all          Automated puppet-based installer for The Foreman
ii  hiera                              1.3.4-1puppetlabs1            all          A simple pluggable Hierarchical Database.
ii  puppet                             3.6.2-1puppetlabs1            all          Centralized configuration management - agent startup and compatibility scripts
ii  puppet-common                      3.6.2-1puppetlabs1            all          Centralized configuration management
ii  puppetdb                           2.1.0-1puppetlabs1            all          PuppetDB Centralized Storage.
ii  puppetdb-terminus                  2.1.0-1puppetlabs1            all          Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
ii  puppetlabs-release                 1.0-7                         all          "Package to install Puppet Labs gpg key and apt repo"
ii  puppetmaster                       3.6.2-1puppetlabs1            all          Centralized configuration management - master startup and compatibility scripts
ii  puppetmaster-common                3.6.2-1puppetlabs1            all          Puppet master common scripts
ii  ruby-kafo                          0.5.3-1                       all          If you write puppet modules for installing your software, you can use kafo to create powerful installer
ii  ruby-rgen                          0.6.5-1puppetlabs1            all          A framework supporting Model Driven Software Development (MDSD)

任何帮助都将不胜感激。我现在已经没有主意了。

答案1

在 Puppet 2 和 3 之间,config.ru(Passenger 用于在 Apache 下运行 Puppet master)需要更新,因为 Puppet 的初始化发生了变化。

请参阅此处的发行说明以了解差异:Puppet 3 发行说明:Puppet Master Rack 配置已更改

Foreman 的安装程序将此文件设置在 /etc/puppet/rack/config.ru,但使用 puppetmaster-passenger 的 Debian 用户可以在 /usr/share/puppet/rack/puppetmasterd/ 下找到它。

Foreman 用户还应注意 Puppet CA 集成所需的 sudoers 更改:将 Puppet 从 v2 升级到 v3 的陷阱

相关内容