Jira (HI-231) Hiera's recursion breaks if a backend returns nil

2014-12-04 Thread Rob Nelson (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Rob Nelson updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-231 
 
 
 
  Hiera's recursion breaks if a backend returns nil  
 
 
 
 
 
 
 
 
 

Change By:
 
 Rob Nelson 
 
 
 
 
 
 
 
 
 
 Wehavehierausingtheresultofahieracallasadatasource,likethis: pre {noformat} :backends:-site-yaml:hierarchy:-%{hiera('site')}-defaults /pre {noformat} Thesitebackendcanreturneithernil(nodatafound),orastringrepresentingthesitecode(i.eLAB),sothatwecanthenhaveaspecificYAMLfilepersite.Thisallworkswell,unlessthesitebackendreturnsnil,inwhichcasehieragetsitselfstuckinaloopuntilitfailswithaSystemStackError.AsnippetoftheHieraoutputisbelow.Foreaseofreproduction,site_backendalwaysreturnsnil. pre  \ #hiera-dmyvalueDEBUG:TueNov2610:39:37+2013:site_backendreturningnil(keyismyvalue)DEBUG:TueNov2610:39:37+2013:HieraYAMLbackendstartingDEBUG:TueNov2610:39:37+2013:LookingupmyvalueinYAMLbackendDEBUG:TueNov2610:39:37+2013:site_backendreturningnil(keyissite)DEBUG:TueNov2610:39:37+2013:LookingupsiteinYAMLbackendDEBUG:TueNov2610:39:37+2013:site_backendreturningnil(keyissite)[...snip...]DEBUG:TueNov2610:39:37+2013:site_backendreturningnil(keyissite)DEBUG:TueNov2610:39:37+2013:LookingupsiteinYAMLbackend/usr/lib/ruby/site_ruby/1.8/hiera/console_logger.rb:9:in`debug':stackleveltoodeep(SystemStackError)from/usr/lib/ruby/site_ruby/1.8/hiera/fallback_logger.rb:39:in`debug'from/usr/lib/ruby/site_ruby/1.8/hiera.rb:35:in`debug'from/usr/lib/ruby/site_ruby/1.8/hiera/backend/site_backend.rb:5:in`lookup'from/usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:174:in`lookup'from/usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:171:in`each'from/usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:171:in`lookup'from/usr/lib/ruby/site_ruby/1.8/hiera/interpolate.rb:43:in`hiera_interpolate'from/usr/lib/ruby/site_ruby/1.8/hiera/interpolate.rb:13:in`send'...1751levels...from/usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:171:in`each'from/usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:171:in`lookup'from/usr/lib/ruby/site_ruby/1.8/hiera.rb:60:in`lookup'from/usr/bin/hiera:221 /pre 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This 

Jira (HI-231) Hiera's recursion breaks if a backend returns nil

2014-06-26 Thread Melissa Stone (JIRA)
Title: Message Title










 

 Melissa Stone commented on an issue


















  Re: Hiera's recursion breaks if a backend returns nil 










Eric Timmerman if you're no longer working on this ticket, will you change the status back to open, and the assignee to Unassigned?












   

 Add Comment

























 Hiera /  HI-231



  Hiera's recursion breaks if a backend returns nil 







 We have hiera using the result of a hiera call as a data source, like this:   pre  :backends:  - site  - yaml  :hierarchy:  - %{hiera('site')}  - defaults  /pre   The site backend can return either nil (no data found), or a string representing the site code (i.e LAB), so that we can then have a specific YAML file per site.   This all works ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-231) Hiera's recursion breaks if a backend returns nil

2014-06-26 Thread Eric Timmerman (JIRA)
Title: Message Title










 

 Eric Timmerman assigned an issue to Unassigned


















 Hiera /  HI-231



  Hiera's recursion breaks if a backend returns nil 










Change By:

 Eric Timmerman




Assignee:

 EricTimmerman












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-231) Hiera's recursion breaks if a backend returns nil

2014-06-16 Thread Eric Timmerman (JIRA)
Title: Message Title










 

 Eric Timmerman assigned an issue to Eric Timmerman


















 Hiera /  HI-231



  Hiera's recursion breaks if a backend returns nil 










Change By:

 Eric Timmerman




Assignee:

 EricTimmerman












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-231) Hiera's recursion breaks if a backend returns nil

2014-04-01 Thread redmine.exporter (JIRA)
Title: Message Title










 

 redmine.exporter created an issue


















 Hiera /  HI-231



  Hiera's recursion breaks if a backend returns nil 










Issue Type:

  Bug




Assignee:


 Unassigned




Created:


 01/Apr/14 3:17 AM




Labels:


 redmine




Priority:

  Normal




Reporter:

 redmine.exporter










We have hiera using the result of a hiera call as a data source, like this:
pre :backends:


site


yaml :hierarchy:


% {hiera('site')}


defaults /pre


The site backend can return either nil (no data found), or a string representing the site code (i.e LAB), so that we can then have a specific YAML file per site.
This all works well, unless the site backend returns nil, in which case hiera gets itself stuck in a loop until it fails with a SystemStackError.
A snippet of the Hiera output is below. For ease of reproduction, site_backend always returns nil. pre