Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2094592 - Fresh install of puppet unable to perform lookups
Summary: Fresh install of puppet unable to perform lookups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: puppet
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Ewoud Kohl van Wijngaarden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-08 00:49 UTC by Ed Marshall
Modified: 2022-06-24 00:58 UTC (History)
5 users (show)

Fixed In Version: puppet-7.17.0-2.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-24 00:58:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ed Marshall 2022-06-08 00:49:55 UTC
Description of problem:
On a fresh installation of puppet on Fedora 36, hiera lookups fail causing a typical setup to fail immediately.

Version-Release number of selected component (if applicable):
puppet-7.12.1-3.fc36.noarch

How reproducible:
Every time

Steps to Reproduce:
1. dnf install -y puppet
2. Run `puppet lookup --explain foo` as root

Actual results:
Error: Could not run: Lookup of key 'lookup_options' failed: wrong number of arguments (given 5, expected 1)

Expected results:
Searching for "lookup_options"
  Global Data Provider (hiera configuration version 5)
    No such key: "lookup_options"
Searching for "foo"
  Global Data Provider (hiera configuration version 5)
    No such key: "foo"
Function lookup() did not find a value for the name 'foo'

Additional info:
Every invocation of puppet throws a ton of warnings now (this block, repeated dozens of times):

/usr/bin/puppet: warning: Exception in finalizer #<Proc:0x00007f59ed0c9088 /usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:85>
/usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in `new': can't alloc thread (ThreadError)
        from /usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in `block in threadlocal_finalizer'

Comment 1 Ewoud Kohl van Wijngaarden 2022-06-12 16:58:35 UTC
Adding --trace for a complete stacktrace:

# puppet lookup --explain foo --trace
Error: Could not run: Lookup of key 'lookup_options' failed: wrong number of arguments (given 5, expected 1)
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:101:in `rescue in check'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:98:in `check'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/data_provider.rb:26:in `key_lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:132:in `lookup_global'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:373:in `block in global_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:373:in `catch'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:373:in `global_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:382:in `env_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:348:in `block (2 levels) in retrieve_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:140:in `with'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:344:in `block in retrieve_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:82:in `lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:343:in `retrieve_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:237:in `lookup_lookup_options'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:64:in `block in lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:82:in `lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:59:in `lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:76:in `search_and_merge'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:31:in `block (2 levels) in lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:31:in `catch'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:31:in `block in lookup'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:29:in `each'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:29:in `reduce'
/usr/share/ruby/vendor_ruby/puppet/pops/lookup.rb:29:in `lookup'
/usr/share/ruby/vendor_ruby/puppet/application/lookup.rb:322:in `block in main'
/usr/share/ruby/vendor_ruby/puppet/application/lookup.rb:378:in `block in generate_scope'
/usr/share/ruby/vendor_ruby/puppet/parser/compiler.rb:153:in `block in compile'
/usr/share/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/usr/share/ruby/vendor_ruby/puppet.rb:302:in `override'
/usr/share/ruby/vendor_ruby/puppet/parser/compiler.rb:123:in `compile'
/usr/share/ruby/vendor_ruby/puppet/application/lookup.rb:378:in `generate_scope'
/usr/share/ruby/vendor_ruby/puppet/application/lookup.rb:318:in `main'
/usr/share/ruby/vendor_ruby/puppet/application.rb:437:in `run_command'
/usr/share/ruby/vendor_ruby/puppet/application.rb:421:in `block in run'
/usr/share/ruby/vendor_ruby/puppet/util.rb:744:in `exit_on_fail'
/usr/share/ruby/vendor_ruby/puppet/application.rb:421:in `run'
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
/usr/bin/puppet:5:in `<main>'

Looking at the source I don't immediately see why it fails. Running a debug session shows it's really happening at another level and it's really a  Puppet::Util::Yaml::YamlLoadError.

In trying to find out the problem I looked at the git log and noticed there were various changes to lookup.rb so I tried Puppet 7.17.0 (rebuilt from rawhide) and now I get:

# puppet lookup --explain foo --trace 
Warning: /etc/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
   (file: /etc/puppet/hiera.yaml)
Searching for "lookup_options"
  Global Data Provider (hiera configuration version 3)
    Using configuration "/etc/puppet/hiera.yaml"
    Hierarchy entry "yaml"
      Merge strategy hash
        Path "/etc/puppet/code/environments/production/hieradata/nodes/$HOSTNAME.yaml"
          Original path: "nodes/%{::trusted.certname}"
          Path not found
        Path "/etc/puppet/code/environments/production/hieradata/common.yaml"
          Original path: "common"
          Path not found
Searching for "foo"
  Global Data Provider (hiera configuration version 3)
    Using configuration "/etc/puppet/hiera.yaml"
    Hierarchy entry "yaml"
      Path "/etc/puppet/code/environments/production/hieradata/nodes/$HOSTNAME.yaml"
        Original path: "nodes/%{::trusted.certname}"
        Path not found
      Path "/etc/puppet/code/environments/production/hieradata/common.yaml"
        Original path: "common"
        Path not found
Function lookup() did not find a value for the name 'foo'
/usr/bin/puppet: warning: Exception in finalizer #<Proc:0x00007f1212fe2ba0 /usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:85>
/usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in `new': can't alloc thread (ThreadError)
	from /usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:86:in `block in threadlocal_finalizer'
/usr/bin/puppet: warning: Exception in finalizer #<Proc:0x00007f12131ba9f0 /usr/share/gems/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:85>
(concurrent-ruby error repeats a number of times)

I've requested rubygem-scanf for f36 (https://pagure.io/releng/fedora-scm-requests/issue/44919) which is needed for Puppet 7.17.0. After that's allowed I'll prepare an update for F36.

As for the concurrent-ruby error, I'm not sure where that comes from but it also shows up with --help.

Comment 2 Fedora Update System 2022-06-14 07:40:03 UTC
FEDORA-2022-5e5b73cff3 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e5b73cff3

Comment 3 Fedora Update System 2022-06-15 01:11:17 UTC
FEDORA-2022-5e5b73cff3 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5e5b73cff3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e5b73cff3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2022-06-16 02:40:00 UTC
FEDORA-2022-5e5b73cff3 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5e5b73cff3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e5b73cff3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-06-24 00:58:21 UTC
FEDORA-2022-5e5b73cff3 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.