I'm still setting up my new PE 2016.4 installation and I'm running into a problem with Hiera data per environment. I followed these steps:

https://docs.puppet.com/puppet/4.7/reference/lookup_quick.html#if-you-already-use-hiera-in-environments

Every Puppet run errors with:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Lookup of key 'classes' failed: Cannot load backend module_data: no such file to load -- hiera/backend/module_data_backend in Cannot load backend module_data: no such file to load -- hiera/backend/module_data_backend at /etc/puppetlabs/code/environments/pe/manifests/site.pp:32:1 on node puppet4-prod.resnet.bris.ac.uk

site.pp:32 contains:

lookup('classes', Array[String], 'unique').include

My per-environment hiera.yaml contains:

---
version: 4
datadir: data

hierarchy:
  - name: "Nodes"
    backend: yaml
    path: "node/%{trusted.certname}"

  - name: "Operating System"
    backend: yaml
    path: "operatingsystem/%{operatingsystem}"

  - name: "Operaring System Release"
    backend: yaml
    path: "operatingsystem/%{operatingsystem}/%{operatingsystemmajrelease}"

  - name: "Virtual"
    backend: yaml
    path: "virtual/%{virtual}"

  - name: "Manufacturer"
    backend: yaml
    path: "manufacturer/%{manufacturer}"

  - name: "Module"
    backend: yaml
    path: "module/%{calling_module}"

  - name: "Common"
    backend: yaml
    path: "common"


The file data/node/puppet4-prod.resnet.bris.ac.uk.yaml contains:

---
classes:
 - 'uob_pe'


So there should definitely be a value for "classes". I tried a command to give some debug output:

[root@puppet4-prod ~]# puppet lookup classes --node puppet4-prod.resnet.bris.ac.uk --explain Error: Could not run: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Method call, 'dig' parameter 'data' expects a Collection value, got String at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/master/puppetserver.pp:673:42

That manifest ships with PE and I haven't messed with it. Anyone know what's going on?

Thanks!
Jonathan

--
Jonathan Gazeley
Senior Systems Administrator
IT Services
University of Bristol

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/848a4f1c-cf9d-a8e5-826f-feb7bd8db2f4%40bristol.ac.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to