Ask Your Question
0

hiera eyaml does not work after upgrading to PE 3.7.2

asked 2014-11-26 09:32:27 -0500

Yeayu gravatar image

Hello all,

I recently upgraded from PE 3.3 to PE 3.7.2, in order to take advantage of the new windows improvements... Everything seems to be ok, except eyaml, which it does not work at all. In fact, i have tried to configure hiera eyaml from scratch on a new puppet master server with the same result...

I would like to point out that hiera without encryption works as expected.

The error I am receiving is the following:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item test:password in any Hiera data file and not default supplied at /etc/puppetlabs/puppet/environments/test/modules/accounts/manifests/init.pp:2 on node mynodexxxx.domain.com

This is my hiera.yaml:

 :backends:
  - eyaml
  - yaml
:hierarchy:
  - "node/%{::clientcert}"
  - "%{environment}"
  - common
:yaml:
  :datadir: /etc/puppetlabs/puppet/hieradata
:eyaml:
  :datadir: /etc/puppetlabs/puppet/hieradata
  :pkcs7_private_key: '/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem'
  :pkcs7_public_key: '/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem'
:logger: console

The content of my .eyaml file is:

test::password: >
    ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEw
    DQYJKoZIhvcNAQEBBQAEggEAmAgX0ZCdwCtxQ7MkJ6FqGwhAS8mVDYAX24Pc
    lbwRZSQtQG/w0fYWiAC2KVeV6IDSIp8F/T48PJgAmK/Uq7c7bXhyPTB5mR52
    /tL9tlBhR+Wb+aaYjFmY+WLOs4kwx4k9XPHQuQmjX0wizDATaOR7E8Sojge4
    mPD3lLrpUkWT1l8Fn+5n1WI9oFDfz3GZGS5R/ITEqvMTm8t6GuWH3XZPHNyP
    j+KFQg7yBLsQYkA8WXYUtOzR+qKrJVDkKLnePRvlro5zpxhfZXZDYmUPpKHR
    PSwy4umbmo3d++E86Kn8Jy1uvyvT7jWW/CCbx3zYuIRexHsx323EitRBNiWZ
    4z9TBDA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBAMZVsKJQz6ARcePmUs
    4XytgBC6w+37Un2OQJkBi6ZQ5Ml3]

and my manifest is (init.pp):

 class accounts{
            $credentials = hiera('test::password')
            ...

what might be the reason of this failure?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-05 11:31:44 -0500

Kevin Corcoran gravatar image

Pindish is correct - /opt/puppet/bin/puppetserver gem install hiera-eyaml is required. If it fails with the error above, that is probably caused by this bug: https://tickets.puppetlabs.com/browse...

As mentioned in that ticket, running ln -s /etc/ssl/certs/java/cacerts /opt/puppet/lib/jvm/pe-java/jre/lib/security/cacerts and then re-running the command to install the gem should suffice as a workaround.

edit flag offensive delete link more

Comments

Yes. Though I can't access the ticket, I verified that creating the sym link does solve the problem I had. Our eyaml backend is happy again. Thank you very much Kevin!

Pindish gravatar imagePindish ( 2015-01-06 01:10:08 -0500 )edit

Ouch! Sorry about that - we have both internal and public JIRA tickets and I accidentally linked you to an internal one. In any case, this matter boils down to a tiny bug in PE 3.7.1 and 3.7.0. It will be fixed in the upcoming 3.7.2. Glad the fix worked for you.

Kevin Corcoran gravatar imageKevin Corcoran ( 2015-01-07 13:32:16 -0500 )edit
1

answered 2015-01-03 13:39:32 -0500

Pindish gravatar image

Hi Yeayu,

We are having the same problem. Wonder if you have a solution yet.

We have no problem using eYAML with open source Puppet 3.7.2 and PE 3.3.2. We are trying to upgrade our PE 3.3.2 setup to the latest PE 3.7.2 and run into the same problem. We use /opt/puppet/bin/gem to install hiera-eyaml. This works fine with command line encryption and decryption. But puppet run cannot find the encrypted data.

Someone mentions that using /opt/puppet/bin/puppetserver to install hiera-eyaml is required for PE 3.7. That doesn't work for us.

# puppetserver gem list

*** LOCAL GEMS ***

ffi (1.9.3 java)
highline (1.6.21)
jar-dependencies (0.0.9)
jruby-openssl (0.9.5 java)
json (1.8.0 java)
krypt (0.0.2)
krypt-core (0.0.2 universal-java)
krypt-provider-jdk (0.0.2)
rake (10.1.0)
rdoc (4.0.1)


# puppetserver gem install hiera-eyaml
ERROR:  Could not find a valid gem 'hiera-eyaml' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - certificate verify failed (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/hiera-eyaml-2.0.6.gemspec.rz)
ERROR:  Possible alternatives: hiera-eyaml

Anyone has a solution yet?

Thanks!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-11-26 09:32:27 -0500

Seen: 1,057 times

Last updated: Jan 05 '15