puppetlabs / puppetlabs-satellite_pe_tools

Other
2 stars 15 forks source link

errors in v4 report processor #159

Closed vchepkov closed 3 years ago

vchepkov commented 3 years ago

Describe the Bug

after upgrading from version 3.1.0 to 4.0.0 report processor stopped working the following tracebacks are in puppetserver.log

2021-03-20T08:32:10.747-04:00 ERROR [qtp623603445-1362932] [puppetserver] Puppet Could not send report to Satellite: undefined method `each_value' for #<Puppet::Util::Metric:0x693ebbc4>
[
"/opt/puppetlabs/puppet/cache/lib/puppet/util/satellite.rb:116:in `block in m2h'",
"org/jruby/RubyHash.java:1415:in `each'",
"/opt/puppetlabs/puppet/cache/lib/puppet/util/satellite.rb:114:in `m2h'",
"/opt/puppetlabs/puppet/cache/lib/puppet/util/satellite.rb:67:in `generate_report'",
"/opt/puppetlabs/puppet/cache/lib/puppet/reports/satellite.rb:15:in `process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:37:in `block in process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:54:in `block in processors'",
"org/jruby/RubyArray.java:1809:in `each'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:51:in `processors'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:30:in `process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:14:in `save'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:316:in `save'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:199:in `do_save'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:54:in `block in call'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:53:in `call'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `block in process'",
"org/jruby/RubyArray.java:1809:in `each'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:87:in `block in process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:70:in `block in with_request_profiling'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:66:in `with_request_profiling'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:86:in `block in process'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:93:in `respond_to_errors'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:85:in `process'",
"uri:classloader:/puppetserver-lib/puppet/server/master.rb:65:in `block in handleRequest'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'",
"/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'",
"uri:classloader:/puppetserver-lib/puppet/server/master.rb:64:in `handleRequest'"]

Environment

DavidS commented 3 years ago

@vchepkov thanks for writing in. Looking through recent changes https://github.com/puppetlabs/puppetlabs-satellite_pe_tools/commit/2d40d60dae2ede50c574bfaaa30e409d3e312d4b#diff-9b24b819c20866ac8734c5f2673c4089d5add380c90c4bd346cef094fb38473bL116-R116 seems to be the likely culprit. I'll pop up a PR reverting that bit.