Bug 1806897

Summary: Red Hat Inventory Uploads fail with NoMethodError: undefined method `mtu'
Product: Red Hat Satellite Reporter: Mikel Olasagasti <molasaga>
Component: RH Cloud - InventoryAssignee: Ron Lavi <rlavi>
Status: CLOSED ERRATA QA Contact: Mirek Długosz <mzalewsk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bkearney, dgross, jjeffers, ktordeur, mhulan, mmccune, oprazak, rlavi, sshtein
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1862248 (view as bug list) Environment:
Last Closed: 2020-10-27 13:00:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikel Olasagasti 2020-02-25 09:49:33 UTC
Satellite-6.6 with latest tfm-rubygem-foreman_inventory_upload, fails when trying to upload inventory for subscription-watch with the following error 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

Comment 3 jcallaha 2020-02-25 18:17:02 UTC
Can you provide any details about the satellite, host(s), configuration, and any noticeable details before encountering this error?

Comment 13 James Jeffers 2020-08-03 14:57:30 UTC
*** Bug 1862248 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2020-10-27 13:00:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366

Comment 17 Red Hat Bugzilla 2023-09-14 05:53:18 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days