Puppet won’t detect augeas

debian-wheezypuppet

Puppet version: 3.1.1

When attempting to use activemq module:

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,
}

I receive this error, running from node:

# 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

If I run it with --debug, this is the output (grepped for augeas, for clarity):

# 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

Update 1: Augeas appears to be installed correctly:

# 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

Any ideas how to fix it?

Best Answer

Looking at the information reported by the one of the packages, it depends of any of 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

So I would guess that you are setting ruby 1.9 to be the default. This can be checked using:


# 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'.
Related Topic