Bug 2025305

Summary: discovered host console does not show IP address
Product: Red Hat Satellite Reporter: Dhananjay Pramod Mule <dmule>
Component: Discovery ImageAssignee: Lukas Zapletal <lzap>
Status: NEW --- QA Contact: addubey
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: lzap, rabajaj, shwsingh
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: UnusedFlags: lzap: needinfo? (dmule)
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Dhananjay Pramod Mule 2021-11-21 15:32:04 UTC
Description of problem:
Discovered host does not show IP details on console 

Version-Release number of selected component (if applicable):
discovery image : foreman-discovery-image-3.7.4-2.el7sat.noarch


How reproducible:
every-time

Steps to Reproduce:
1. Boot VM with discovery ISO provided by rpm 'foreman-discovery-image-3.7.4-2.el7sat.noarch'
2. Host discovery shows status as successful but parameters 'Primary IP v4' does show value as 'NA'
   though IP and interface related facts show good results 
~~~
tfm-ruby /opt/theforeman/tfm/root/usr/bin/facter {ipaddress,ipaddress_ens192,macaddress}
ipaddress => XX.XX.XX.XX
ipaddress_ens192 => XX.XX.XX.XX
macaddress => 00:xx:xx:xx:xx:xx
~~~

Actual results:
Primary IP v4 on host console does show nil value

Expected results:
'Primary IP v4' on host console show show correct IP address 


Additional info:
below mentioned error is reported on discovery_debug
~~~~
Discovered by URL: https://satellite.example.com
Registering host at (https://satellite.example.com)
Could not retrieve fact='ethtool', resolution='<anonymous>': undefined method `[]' for nil:NilClass
Response from server 201: {"last_report":"2021-11-21T11:08:54.184Z","build":false,"id":89,"name":"mac005056aebd0f","last_compile":null,"updated_at":"2021-11-21T11:08:54.346Z","created_at":"2021-11-13T17:25:09.030Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"environment_id":null,"ptable_id":null,"medium_id":null,"comment":null,"disk":null,"installed_at":null,"model_id":1,"hostgroup_id":null,"owner_id":1,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":null,"uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":null,"image_id":null,"organization_id":1,"location_id":2,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":null,"grub_pass":"","discovery_rule_id":null,"global_status":0,"lookup_value_matcher":null,"openscap_proxy_id":null,"pxe_loader":null,"initiated_at":null,"build_errors":null}
Wrote result 201 to /tmp/discovery-http-success
Detecting the first NICs with link
Interface with link found: 00:50:56:xx:xx:xx (ens192)
Could not retrieve fact='ethtool', resolution='<anonymous>': undefined method `[]' for nil:NilClass
Fact cache invalid, reloading to foreman
Discovered by URL: https://satellite.example.com
~~~

Comment 2 Lukas Zapletal 2021-11-23 09:40:39 UTC
This bug was fixed in 3.7.6+. https://github.com/theforeman/foreman-discovery-image/pull/137

Please ask the customer to try FDI from Satellite 6.10: https://people.redhat.com/~lzapleta/fdi/sat610/

It is compatible with Satellite 6.8+ so they can continue using that in production.

Comment 3 Brad Buckingham 2023-07-21 21:06:39 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.