Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors of yaml and no eyaml files exist. Fine if just eyaml files exist. #82

Closed
shawn-sterling opened this issue Mar 26, 2014 · 2 comments

Comments

@shawn-sterling
Copy link

Hello, first off I am running:
CentOS 6.5
puppet-3.4.3-1.el6.noarch
puppet-server-3.4.3-1.el6.noarch

gem list
hiera (1.3.2)
hiera-eyaml (2.0.1)
highline (1.6.21)
json (1.5.5)
json_pure (1.8.1)
stomp (1.2.2)
trollop (2.0)

My hiera.yaml looks like this:


---
:backends:
 - eyaml
 - yaml

:yaml:
  :datadir: /etc/puppet/environments/%{environment}/hiera/

:eyaml:
  :datadir: /etc/puppet/environments/%{environment}/hiera/
  :pkcs7_private_key: /etc/puppet/secure/private_key.pkcs7.pem
  :pkcs7_public_key: /etc/puppet/environments/master/public_key.pkcs7.pem

:hierarchy:
  - %{::clientcert}
  - %{::environment}
  - %{::stage}
  - %{::location}
  - common

:logger: console

When I have .yaml files (and no eyaml files) in my hiera dir I get this error:

Error 400 on SERVER: Error from DataBinding 'hiera' while looking up 'repo::domain::url': undefined method `read_file' for #<Hiera::Filecache:0x7f9b1aae1b60 @cache={}> on node bla

If I either:
rename .yaml .eyaml *.yaml

OR if I disable eyaml from the hiera.yaml, everything works as it should.

Here is a --trace:
https://gist.github.com/shawn-sterling/9774519

If there is anything I can do to help further debug this issue let me know.

Have a good day.

-Shawn

@sihil
Copy link
Collaborator

sihil commented Apr 11, 2014

I wonder if this was introduced with the change of hiera backend introduced in #70. Can't quite see how, but it would be highly coincidental if it wasn't connected in some way.

Fix one bug, and introduce another :(

@Dan33l
Copy link
Member

Dan33l commented Sep 26, 2018

it can be reopened if it's reproducible on the latest Puppet 4 or newer

@Dan33l Dan33l closed this as completed Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants