The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #12122

Hiera support for multiple backend

Added by Nan Liu over 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:01/24/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Keywords: Affected Hiera Version:

We've Moved!

Ticket tracking is now hosted in JIRA:


If hiera is configured for multiple backend, if the first backend fail to find data it will result in immediate failure even if the second backend supplies data. This doesn’t affect hiera function, just hiera_array hiera_hash (which is almost identical except how the data is handled.

:backends: - puppet

:hierarchy: - %{certname}
            - %{environment}
            - common


notice: 5
notice: /Stage[main]/Test/Notify[5]/message: defined 'message' as '5'
notice: 3
notice: /Stage[main]/Test/Notify[3]/message: defined 'message' as '3'
notice: 2
notice: /Stage[main]/Test/Notify[2]/message: defined 'message' as '2'
notice: Finished catalog run in 0.08 seconds

Add yaml:

:backends: - yaml
           - puppet

:hierarchy: - %{certname}
            - %{environment}
            - common


$ puppet apply -e 'include test'
undefined method `empty?' for nil:NilClass at /etc/puppetlabs/puppet/modules/test/manifests/init.pp:2 on node master.puppetlabs.lan

Related issues

Related to Hiera - Bug #13408: Hiera does not correctly handle (false) Booleans returned... Merged - Pending Release 03/26/2012


#1 Updated by Nan Liu over 4 years ago

  • Description updated (diff)

#3 Updated by James Turnbull about 4 years ago

  • Status changed from Investigating to In Topic Branch Pending Review
  • Branch set to

#4 Updated by Kelsey Hightower about 4 years ago

Reviewing this now, I have commented on the Pull request that this need to be rebased on master. I’ll be happy to help with that.

#5 Updated by Patrick Carlisle almost 4 years ago

  • Branch deleted (

These all go together, the hiera-puppet and hiera-json pull requests bring those into line with the changes in the hiera pull request. This takes the opposite approach of the previous pull request, moving to using nil consistently instead of empty hashes and arrays consistently.

#6 Updated by Patrick Carlisle almost 4 years ago

I believe the changes I made should also fix #13408 and #10590

#7 Updated by Kelsey Hightower almost 4 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Branch set to

#10 Updated by Matthaus Owens almost 4 years ago

  • Status changed from Merged - Pending Release to Closed

Released in hiera 1.0.0rc4

Also available in: Atom PDF