The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #12122

Hiera support for multiple backend

Added by Nan Liu about 2 years ago. Updated over 1 year ago.

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

0%

Category:hiera-puppet
Target version:-
Keywords: Affected Hiera Version:
Branch:https://github.com/puppetlabs/hiera/pull/68

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

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

Result:

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

Panic!:

$ 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

History

#1 Updated by Nan Liu about 2 years ago

  • Description updated (diff)

#3 Updated by James Turnbull about 2 years ago

  • Status changed from Investigating to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/hiera/pull/37

#4 Updated by Kelsey Hightower almost 2 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 2 years ago

  • Branch deleted (https://github.com/puppetlabs/hiera/pull/37)

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.

https://github.com/puppetlabs/hiera-puppet/pull/32

https://github.com/puppetlabs/hiera-json/pull/4

https://github.com/puppetlabs/hiera/pull/68

#6 Updated by Patrick Carlisle almost 2 years ago

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

#7 Updated by Kelsey Hightower almost 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Branch set to https://github.com/puppetlabs/hiera/pull/68

#10 Updated by Matthaus Owens over 1 year ago

  • Status changed from Merged - Pending Release to Closed

Released in hiera 1.0.0rc4

Also available in: Atom PDF