Puppet 无法检测 Augeas

Puppet 无法检测 Augeas

Puppet版本:3.1.1

当尝试使用主动队列模块:

package {'openjdk-6-jre-headless':
    ensure => present,
}
class {'activemq':
    version => '5.8.0',
    user    => 'activemq',
    group   => 'activemq',
    home    => '/opt',
    console => true,
}
# following block causes issues with augeas
class { 'activemq::stomp':
    port => 61613,
}

从节点运行时我收到此错误:

# puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Caching catalog for xxx
Info: Applying configuration version '1368621971'
Notice: /Stage[main]/Activemq/Service[activemq]: Dependency Augeas[activemq-stomp] has failures: true
Warning: /Stage[main]/Activemq/Service[activemq]: Skipping because of failed dependencies
Error: Could not find a suitable provider for augeas
Notice: Finished catalog run in 0.41 seconds

如果我用 运行它--debug,这是输出(为了清楚起见,对 augeas 进行了 grep):

# puppet agent --test --debug|grep augeas -i
Debug: Failed to load library 'augeas' for feature 'augeas'
Debug: Failed to load library 'augeas' for feature 'augeas'
Debug: Puppet::Type::Augeas::ProviderAugeas: feature augeas is missing
Debug: Failed to load library 'augeas' for feature 'augeas'
Debug: Puppet::Type::Augeas::ProviderAugeas: feature augeas is missing
Debug: /Stage[main]/Activemq::Stomp/Augeas[activemq-stomp]/require: requires File[/opt/activemq]
Debug: /Stage[main]/Activemq::Stomp/Augeas[activemq-stomp]/notify: subscribes to Service[activemq]
Debug: Failed to load library 'augeas' for feature 'augeas'
Debug: Puppet::Type::Augeas::ProviderAugeas: feature augeas is missing
Debug: Failed to load library 'augeas' for feature 'augeas'
Debug: Puppet::Type::Augeas::ProviderAugeas: feature augeas is missing
Notice: /Stage[main]/Activemq/Service[activemq]: Dependency Augeas[activemq-stomp] has failures: true
Warning: /Stage[main]/Activemq/Service[activemq]: Skipping because of failed dependencies
Error: Could not find a suitable provider for augeas

更新 1:Augeas 似乎已正确安装:

# dpkg -l | grep augeas
ii  augeas-lenses            0.10.0-1     all
ii  augeas-tools             0.10.0-1     amd64
ii  libaugeas-ruby1.8        0.4.1-1.1    amd64
ii  libaugeas0               0.10.0-1     amd64

有什么想法可以解决它吗?

答案1

查看其中一个报告的信息,这取决于libaugeas-ruby1.{8,9}


# dpkg --info puppet-common_3.1.1-1puppetlabs1_all.deb
 Package: puppet-common
 Source: puppet
 Version: 3.1.1-1puppetlabs1
 Architecture: all
 Maintainer: Puppet Labs 
 Installed-Size: 3592
 Depends: ruby | ruby-interpreter, libxmlrpc-ruby, libopenssl-ruby, libshadow-ruby1.8 | ruby-shadow, libaugeas-ruby1.8 | libaugeas-ruby1.9, adduser, lsb-base, sysv-rc (>= 2.86) | file-rc, hiera (>= 1.0.0), facter (>= 1.6.12)
 Homepage: http://projects.puppetlabs.com/projects/puppet

因此我猜想你将 ruby​​ 1.9 设置为默认值。可以使用以下命令进行检查:


# update-alternatives --display ruby
ruby - auto mode
  link currently points to /usr/bin/ruby1.9.1
/usr/bin/ruby1.8 - priority 50
  slave erb: /usr/bin/erb1.8
  slave erb.1.gz: /usr/share/man/man1/erb1.8.1.gz
  slave irb: /usr/bin/irb1.8
  slave irb.1.gz: /usr/share/man/man1/irb1.8.1.gz
  slave rdoc: /usr/bin/rdoc1.8
  slave rdoc.1.gz: /usr/share/man/man1/rdoc1.8.1.gz
  slave ri: /usr/bin/ri1.8
  slave ri.1.gz: /usr/share/man/man1/ri1.8.1.gz
  slave ruby.1.gz: /usr/share/man/man1/ruby1.8.1.gz
  slave testrb: /usr/bin/testrb1.8
  slave testrb.1.gz: /usr/share/man/man1/testrb1.8.1.gz
/usr/bin/ruby1.9.1 - priority 51
  slave erb: /usr/bin/erb1.9.1
  slave erb.1.gz: /usr/share/man/man1/erb1.9.1.1.gz
  slave irb: /usr/bin/irb1.9.1
  slave irb.1.gz: /usr/share/man/man1/irb1.9.1.1.gz
  slave rdoc: /usr/bin/rdoc1.9.1
  slave rdoc.1.gz: /usr/share/man/man1/rdoc1.9.1.1.gz
  slave ri: /usr/bin/ri1.9.1
  slave ri.1.gz: /usr/share/man/man1/ri1.9.1.1.gz
  slave ruby.1.gz: /usr/share/man/man1/ruby1.9.1.1.gz
  slave testrb: /usr/bin/testrb1.9.1
  slave testrb.1.gz: /usr/share/man/man1/testrb1.9.1.1.gz
Current 'best' version is '/usr/bin/ruby1.9.1'.

相关内容