Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kmod fact consistently fails with 'expected argument to be a String, Symbol, or Hash' #74

Closed
kajinamit opened this issue Feb 2, 2022 · 0 comments · Fixed by #75
Closed

Comments

@kajinamit
Copy link
Contributor

kajinamit commented Feb 2, 2022

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:7.1.0
  • Ruby: 3.0.2
  • Distribution: CentOS 9 Stream + RDO
  • Module version: current master, hash: c6ad054

How to reproduce (e.g Puppet code you use)

Run manifests with the module installed.

What are you seeing

The following error is logged while gathering facts.


2022-02-01 12:15:09 -0500 Facter (err): error while resolving custom facts in /usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb: expected argument to be a String, Symbol, or Hash
backtrace:
/usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb:3:in `confine'
/usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb:3:in `block in <top (required)>'
/usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb:1:in `instance_eval'
/usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb:1:in `add'
/usr/share/openstack-puppet/modules/kmod/lib/facter/kmod.rb:1:in `<top (required)>'
/usr/share/ruby/vendor_ruby/puppet/provider/package/puppet_gem.rb:7:in `value'
/usr/share/ruby/vendor_ruby/puppet/provider/package/puppet_gem.rb:7:in `block in <top (required)>'
/usr/share/ruby/vendor_ruby/puppet/util/classgen.rb:132:in `class_eval'
/usr/share/ruby/vendor_ruby/puppet/util/classgen.rb:132:in `genthing'
/usr/share/ruby/vendor_ruby/puppet/util/classgen.rb:33:in `genclass'
/usr/share/ruby/vendor_ruby/puppet/type.rb:1847:in `provide'
/usr/share/ruby/vendor_ruby/puppet/provider/package/puppet_gem.rb:1:in `<top (required)>'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:78:in `load'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:78:in `load_file'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:93:in `block in loadall'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:91:in `each'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:91:in `loadall'
/usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:196:in `loadall'
/usr/share/ruby/vendor_ruby/puppet/metatype/manager.rb:126:in `block in newtype'
/usr/share/ruby/vendor_ruby/puppet/concurrent/lock.rb:10:in `synchronize'
/usr/share/ruby/vendor_ruby/puppet/metatype/manager.rb:73:in `newtype'
/usr/share/ruby/vendor_ruby/puppet/type/package.rb:11:in `<module:Puppet>'
/usr/share/ruby/vendor_ruby/puppet/type/package.rb:10:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
/usr/share/openstack-puppet/modules/stdlib/lib/facter/package_provider.rb:13:in `<top (required)>'
/usr/share/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:39:in `to_hash'
/usr/share/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:39:in `find'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:223:in `find'
/usr/share/ruby/vendor_ruby/puppet/node.rb:138:in `fact_merge'
/usr/share/ruby/vendor_ruby/puppet/indirector/node/plain.rb:18:in `find'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:223:in `find'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:364:in `get_node'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:205:in `main'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:179: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'
/bin/puppet:5:in `<main>'

What behaviour did you expect instead

The error should not be logged

Output log

See above

Any additional information you'd like to impart

It seems the issue was cuased by #44 which was recently added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant