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

Bug #10975

Hiera CLI displays no output with ruby 1.9.2

Added by sascha bates almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:11/20/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:hiera
Target version:1.0.0
Keywords: Affected Hiera Version:
Branch:

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

Given yaml and json files with identical data, hiera displays no data when queried:

[root@puppetmaster hieradata]# hiera -c /etc/hiera.yaml ds_names
WARN: 2011-11-20 15:31:45 -0600: Failed to load noop logger: LoadError: no such file to load -- hiera/noop_logger
nil
[root@puppetmaster hieradata]# hiera -c /etc/hiera.yaml ds_names -d
nil

however, when I switched on rvm and switched to 1.8.7 all was well:

[vagrant@puppetmaster ~]$ hiera -c /etc/hiera.yaml ds_names
{"ATGSwitchingDS_A"=>"CATA", "ATGSwitchingDS_B"=>"CATB", "atgmanagement_ds"=>"AGENT", "ATGPublishingDS"=>"PUB", "ATGProductionDS"=>"CORE"}

puppet-10975.patch Magnifier (884 Bytes) Mark Frost, 01/16/2012 01:10 pm

puppet-10975.patch Magnifier (779 Bytes) Mark Frost, 01/16/2012 01:32 pm

puppet-10975.patch Magnifier (685 Bytes) Mark Frost, 01/16/2012 01:44 pm

rubygem-hiera.spec (1.54 KB) Mark Frost, 01/16/2012 01:48 pm


Related issues

Duplicated by Puppet - Bug #11965: Hiera can't find any data Closed 01/16/2012

History

#1 Updated by James Turnbull almost 3 years ago

  • Description updated (diff)
  • Category set to hiera
  • Status changed from Unreviewed to Accepted
  • Assignee set to R.I. Pienaar

I’ll take a look.

RI – any ideas before I do?

#2 Updated by Mark Frost almost 3 years ago

I can confirm having this same issue. I created ticket 11965, but then closed it as a duplicate of this one.

#3 Updated by Mark Frost almost 3 years ago

I communicated with R.I. over email, and he helped me come up with the attached patch.

This fixes the actual error that’s happening itself… but personally I still feel as though something additionally may need to be done here. Since on the CLI the module was failing silently, with no debug output, and simply returning “nil” as if that was the correct value, it seems to me there should probably be something additional added in somewhere to catch this case and say something if it happens again.

However, at least for the time being, this patch takes care of the issue.

I’m gonna go ahead and bounce it back to you, James. Hope you don’t mind.

#4 Updated by James Turnbull almost 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee changed from James Turnbull to Hunter Haugen

Hunter – can you take a look when you get a chance please.

#5 Updated by Mark Frost almost 3 years ago

Minor formatting touch-ups to my patch

#6 Updated by Mark Frost almost 3 years ago

Annnnd another… sorry. This one should be compatible with other patches I’ve seen on Puppet, as well as RPM-compliant.

#7 Updated by Mark Frost almost 3 years ago

Here’s a copy of my Centos (5 or 6) RPM spec file, in case someone else finds this ticket and is interested in applying this patch for themselves.

#8 Updated by Anonymous almost 3 years ago

Mark Frost wrote:

Here’s a copy of my Centos (5 or 6) RPM spec file, in case someone else finds this ticket and is interested in applying this patch for themselves.

G'day Mark. Any chance we could get you to sign a CLA, which we need to use your contribution.

It would be awesome if you could submit that as a pull request against the project too, although that isn’t totally required.

#9 Updated by Mark Frost almost 3 years ago

Signed. Sorry bout that, I knew that was coming and meant to sign it beforehand.

I’m less confident about doing the pull request (SVN guy primarily), so I’ll leave that to you if it’s okay.

#10 Updated by Anonymous over 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Assignee deleted (Hunter Haugen)
  • Target version set to 0.2.0

Thanks, this is now merged.

#11 Updated by Ken Barber over 2 years ago

  • Target version changed from 0.2.0 to 0.3.1

Repointing to new 0.3.1 version in Redmine, since the versions for this product weren’t up-to-date.

#12 Updated by Matthaus Owens over 2 years ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 0.3.1 to 1.0.0

Released in hiera 1.0.0rc2

Also available in: Atom PDF