Red Hat Inventory Uploads fail with NoMethodError: undefined method `mtu'
Issue
When trying to upload inventory for subscription-watch, it fails with the following trace:
rake aborted!
NoMethodError: undefined method `mtu' for #<Nic::Base:0x000000001a192e58>
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/attribute_methods.rb:430:in `method_missing'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:76:in `block (2 levels) in report_system_profile'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:72:in `map'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:72:in `block in report_system_profile'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:11:in `array'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:35:in `array_field'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:71:in `report_system_profile'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:53:in `block (2 levels) in report_host'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:17:in `object'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:41:in `object_field'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:52:in `block in report_host'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:17:in `object'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:34:in `report_host'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:26:in `block (3 levels) in report_slice'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:24:in `block (2 levels) in report_slice'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:11:in `array'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:35:in `array_field'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:22:in `block in report_slice'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:17:in `object'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:20:in `report_slice'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/slice.rb:13:in `render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:48:in `block in generate_slice'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:46:in `open'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:46:in `generate_slice'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:21:in `block (4 levels) in render'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches/batch_enumerator.rb:64:in `block in each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:238:in `block in in_batches'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:222:in `loop'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:222:in `in_batches'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches/batch_enumerator.rb:64:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches/batch_enumerator.rb:64:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:17:in `block (3 levels) in render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/metadata.rb:30:in `block (2 levels) in render_report'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:17:in `object'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:41:in `object_field'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/metadata.rb:29:in `block in render_report'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/json_stream.rb:17:in `object'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/metadata.rb:24:in `render_report'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/metadata.rb:17:in `render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:15:in `block (2 levels) in render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:13:in `open'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:13:in `block in render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/foreman_inventory_upload/generators/archived_report.rb:10:in `render'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/tasks/generator.rake:24:in `block (4 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/tasks/generator.rake:21:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_inventory_upload-1.0.2/lib/tasks/generator.rake:21:in `block (3 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => foreman_inventory_upload:report:generate
(See full trace by running task with --trace)
Must specify either portal_user or organization_id
I, [2020-01-07T10:06:00.426111 #123337] INFO -- : Started generating hosts report in /tmp/d20200107-123337-fgqf9d
I, [2020-01-07T10:06:01.705872 #123337] INFO -- : Adding slice 9e69b454-c613-467a-907c-95cb98b293b7 with 1000 hosts
I, [2020-01-07T10:06:53.261989 #123337] INFO -- : Adding slice c0d1fc51-3514-4923-a88e-ec7e1e53d9a2 with 1000 hosts
I, [2020-01-07T10:08:20.862120 #123337] INFO -- : Adding slice c0e2f372-6a5f-4958-b988-e08b980d5853 with 1000 hosts
I, [2020-01-07T10:09:56.892749 #123337] INFO -- : Adding slice d07e00e3-f97a-474f-bd02-8be208b04fa5 with 1000 hosts
I, [2020-01-07T10:11:23.275860 #123337] INFO -- : Adding slice 2f74db05-88a1-41bd-bc41-577bed7ceabe with 1000 hosts
I, [2020-01-07T10:12:59.152355 #123337] INFO -- : Adding slice 3d89c5eb-68c3-474f-a3c8-524c02aac7ca with 1000 hosts
I, [2020-01-07T10:14:28.913591 #123337] INFO -- : Adding slice 14eed88a-46fe-4ea8-a072-f2be94aab7d2 with 1000 hosts
I, [2020-01-07T10:16:05.686538 #123337] INFO -- : Adding slice 7e12fe60-3447-4d17-a758-36e8c5e7a8d1 with 1000 hosts
Environment
- Red Hat Satellite 6.5 (with tfm-rubygem-foreman_inventory_upload)
- Red Hat Satellite 6.6 (with tfm-rubygem-foreman_rh_cloud)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.