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

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 https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #18718

command line hiera fails if using puppet logger and -d

Added by Chad Huneycutt over 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:ImmediateDue date:
Assignee:Patrick Carlisle% Done:

0%

Category:-
Target version:1.2.0
Keywords:backlog Affected Hiera Version:1.1.2
Branch:https://github.com/puppetlabs/hiera/pull/117

We've Moved!

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


Description

If you turn on debugging of the hiera command line tool and have the puppet logger specified in hiera.yaml, the run fails like so:

[root@myhost hiera]# hiera  -d -c /etc/puppet/hiera.yaml
/usr/lib/ruby/site_ruby/1.8/hiera/puppet_logger.rb:9:in `debug': uninitialized constant Module::Puppet (NameError)
        from /usr/lib/ruby/site_ruby/1.8/hiera.rb:37:in `debug'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend/siteyaml_backend.rb:6:in `initialize'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:158:in `new'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:158:in `lookup'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:156:in `each'
        from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:156:in `lookup'
        from /usr/lib/ruby/site_ruby/1.8/hiera.rb:62:in `lookup'
        from /usr/bin/hiera:220

I am running puppet and hiera rpms from the puppetlabs repos, versions 3.0.2-1.el6 and 1.1.2-1.el6, respectively.

History

#1 Updated by Patrick Carlisle about 3 years ago

  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Assignee set to Patrick Carlisle
  • Target version set to 1.2.0
  • Branch set to https://github.com/puppetlabs/hiera/pull/113
  • Affected Hiera Version set to 1.1.2

#2 Updated by Patrick Carlisle about 3 years ago

Thanks for the bug report. I’ve put together a patch that makes it fall back to the console logger when hiera is run from the command line. Does this seem like the right solution?

#3 Updated by Chad Huneycutt about 3 years ago

Makes sense to me. Thanks!

#4 Updated by Anonymous about 3 years ago

  • Priority changed from Normal to Immediate

#5 Updated by Anonymous about 3 years ago

  • Keywords set to backlog

#6 Updated by Anonymous about 3 years ago

  • Branch changed from https://github.com/puppetlabs/hiera/pull/113 to https://github.com/puppetlabs/hiera/pull/117

Submitted a new pull request that gives a more explicit mechanism for the fallback. https://github.com/puppetlabs/hiera/pull/117

#7 Updated by Matthaus Owens about 3 years ago

  • Target version deleted (1.2.0)

#8 Updated by Patrick Carlisle about 3 years ago

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

Merged in 722ce2b.

#9 Updated by Matthaus Owens about 3 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Hiera 1.2.0

Also available in: Atom PDF