Closed dan-wittenberg closed 4 years ago
This appears to have been a Hiera or Puppet Server issue rather than an issue with this provider. Please test with the current version of this module, and validate with puppetserver gem list
and reopen this issue if necessary!
Tested on 2015.2.1 and 2015.2.2
Puppetfile: mod 'puppetlabs-puppetserver_gem', '0.1.0'
Then we try and load the gem: package { 'hiera-eyaml': ensure => '2.0.8', provider => 'puppetserver_gem', } Notice: /Stage[main]/Puppet_master/Package[hiera-eyaml]/ensure: created
/opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/hiera-eyaml-2.0.8/lib/hiera/backend/eyaml_backend.rb
:backends:
I put a variable in common.yaml and in the secure.eyaml, and it never finds the secure one: Notice: secret_pass: not_secured_file
I run the puppetserver in the foreground and then run puppet agent: /opt/puppetlabs/bin/puppetserver foreground --debug |grep -i hiera INFO [qtp1702585616-20] [puppet-server] Puppet hiera(): Cannot load backend eyaml: no such file to load -- hiera/backend/eyaml_bac kend
I also tried using puppet_gem to install into the non-jruby environment, but it had the same effect. First I removed the original install:
/opt/puppetlabs/bin/puppetserver gem uninstall highline hiera-eyaml
package { 'hiera-eyaml': ensure => '2.0.8', provider => 'puppet_gem', }
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera-eyaml-2.0.8/lib/hiera/backend/eyaml_backend.rb
Still fails the same way.
I then created the following links and then it's happy and works: file { '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/backend/eyaml': ensure => link, target => '/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera-eyaml-2.0.8/lib/hiera/backend/eyaml', require => Package['hiera-eyaml'], }
file { '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/backend/eyaml_backend.rb': ensure => link, target => '/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera-eyaml-2.0.8/lib/hiera/backend/eyaml_backend.rb', require => Package['hiera-eyaml'], }
file { '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/backend/eyaml.rb': ensure => link, target => '/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera-eyaml-2.0.8/lib/hiera/backend/eyaml.rb', require => Package['hiera-eyaml'], }
file { '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/highline/': ensure => link, target => '/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/highline-1.6.21/lib/highline', require => Package['hiera-eyaml'], }
file { '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/highline.rb': ensure => link, target => '/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/highline-1.6.21/lib/highline.rb', require => Package['hiera-eyaml'], }
DEBUG [qtp1515916820-20] [puppet-server] Puppet hiera(): [eyaml_backend]: Hiera eYAML backend starting
Notice: secret_pass: secured_file_success
So it seems that puppetserver_gem or puppet_gem isn't installing the gems where hiera needs to be able to use them.