hiera error in agent run after reboot

188 views
Skip to first unread message

Michael Zoet

unread,
Feb 13, 2017, 10:47:23 AM2/13/17
to Puppet Users
Hello Puppet Users,

I have a strange problem after I restarted my Puppet master (and
several other nodes). When I do a puppet agent run now I get the
following output:

===============
puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on
SERVER: Server Error: Evaluation Error: Error while evaluating a
Resource Statement, Lookup of key 'lookup_options' failed: The Lookup
Configuration at '/etc/puppetlabs/code/hiera.yaml' has wrong type,
unrecognized key 'http' at
/etc/puppetlabs/code/environments/production/roles/role_base/manifests/init.pp:5:5 on node
host-1.node.ekimp.local
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The contents of /etc/puppetlabs/code/hiera.yaml
===============
---
:backends:
- yaml
- etcd

:logger: console

:hierarchy:
- nodes/%{trusted.certname}
- projects/%{node_project}
- roles/%{node_role}/%{node_instance}
- roles/%{node_role}
- location/%{node_location}/%{node_location_no}
- location/%{node_location}
- server_type/%{node_server_type}
- os/%{operatingsystem}/%{lsbdistcodename}
- users
- common
- passwords

:yaml:
:datadir: '/etc/puppetlabs/code/environments/%{environment}/data'

:http:
:host: 192.168.122.1
:port: 4001
:paths:
- /data/nodes/%{trusted.certname}
- /data
===============

The :http: config is for connecting to etcd via this Puppet module
https://forge.puppet.com/garethr/hiera_etcd.

For me it seems that this module is not loaded anymore. What bothers
me is that there were no configuration changes, only the reboot.
Before the reboot everything worked fine. After that the logs are full
with the error message from above.
I am completely at a loss here what might be wrong. Has someone any
ideas? Or hints? Or links to documentation? Or recommendations how to
use etcd (https://github.com/coreos/etcd) with hiera? (I did not set
this up I am only maintaining it.)

Technical details:
- all servers run Debian Jessie
- packages are from the Puppetlabs Debian repository http://apt.puppetlabs.com
- Puppetserver version 2.7.2-1puppetlabs1
- Puppet agent version 1.9.1-1jessie on all nodes

Content of
/etc/puppetlabs/code/environments/production/roles/role_base/manifests/init.pp
(Nothing fancy, it is the base class that every node gets applied.)
===============
# base class for everyone
class role_base {
class pre {
# ensure_resource('class', 'profile_base::apt', {})
class { 'profile_base': }
}
class { 'role_base::pre': stage => 'pre_setup' }

class { 'profile_base::apt': }
class { 'profile_base::locales': }
class { 'profile_base::network': }
class { 'profile_etcd': }
class { 'profile_base::user': }
class { 'profile_base::sudo': }
class { 'profile_base::puppet': }
class { 'profile_base::backup': }
class { 'profile_base::env': }
class { 'profile_base::ssh': }
class { 'profile_base::host': }
class { 'profile_icinga': }

if $virtual == 'physical' {
class { 'profile_base::ntp': }
}
}
===============

THX in advance,
Michael

Lindsey Smith

unread,
Feb 17, 2017, 9:30:52 AM2/17/17
to Puppet Users
We believe that this issue was fixed in the recently released Puppet 4.9.2. See https://docs.puppet.com/puppet/4.9/release_notes.html#bug-fixes and https://tickets.puppetlabs.com/browse/PUP-7164

Lindsey
Reply all
Reply to author
Forward
0 new messages