RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1729026 - [RHEL7.7] Redfish-finder reports an error if the string "Redfish Service Hostname" is empty
Summary: [RHEL7.7] Redfish-finder reports an error if the string "Redfish Service Host...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: redfish-finder
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: John Shortt
QA Contact: Rachel Sibley
URL:
Whiteboard:
Depends On:
Blocks: 1713151 1781947
TreeView+ depends on / blocked
 
Reported: 2019-07-11 08:45 UTC by Adrian Huang
Modified: 2020-09-29 19:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:58:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3935 0 None None None 2020-09-29 19:58:25 UTC

Description Adrian Huang 2019-07-11 08:45:26 UTC
Description of problem:
Redfish Host Interface Specification defines the field "Redfish
Service Hostname" as "Varies", which means it can be empty. Moreover,
this field is not mandatory for well-defined configuration (a valid
string).

The original design assumes that this field is non-empty string shown
as follows:

-------------------------------------------------------------------
        self.hostname = cursor.split()[0]
-------------------------------------------------------------------

This leads to the exception, and the "self.hostname" is not configured.
Here is the error output:

-------------------------------------------------------------------
redfish-finder: Getting dmidecode info
redfish-finder: Unexpected error parsing ServiceConfig
redfish-finder: Building NetworkManager connection info
redfish-finder: Obtaining OS config info
redfish-finder: Converting SMBIOS Host Config to NetworkManager Connection info
redfish-finder: Applying NetworkManager connection configuration changes
Error: 'enp6s0f3u2u3c2' is not an active connection.
Error: no active connection provided.
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
redfish-finder: Adding redfish host info to OS config
Traceback (most recent call last):
  File "./redfish-finder", line 526, in <module>
    main()
  File "./redfish-finder", line 520, in main
    svc.update_redfish_info()
  File "./redfish-finder", line 349, in update_redfish_info
    if h.find(self.sconf.hostname) != -1:
AttributeError: ServiceConfig instance has no attribute 'hostname'
-------------------------------------------------------------------

Here is the dump info for SMBIOS type 42:
-----------------------------------------------------------
[root@localhost redfish-finder-master]# dmidecode -t 42
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.2.0 present.

Handle 0x002E, DMI type 42, 12 bytes
Management Controller Host Interface

Handle 0x006C, DMI type 42, 129 bytes
Management Controller Host Interface
        Host Interface Type: Network
        Device Type: USB
                idVendor: 0x046b
                idProduct: 0xffb0
                Protocol ID: 04 (Redfish over IP)
                        Service UUID: 3ce1a1c7-e776-8a04-0010-580d60c9773b
                        Host IP Assignment Type: Static
                        Host IP Address Format: IPv4
                        IPv4 Address: 169.254.0.18
                        IPv4 Mask: 255.255.240.0
                        Redfish Service IP Discovery Type: Static
                        Redfish Service IP Address Format: IPv4
                        IPv4 Redfish Service Address: 169.254.0.17
                        IPv4 Redfish Service Mask: 255.255.240.0
                        Redfish Service Port: 443
                        Redfish Service Vlan: 0
                        Redfish Service Hostname:
-----------------------------------------------------------

The field "Redfish Service Hostname" is empty.

There is a patch to fix the above-mentioned issue: https://github.com/AdrianHuang/redfish-finder/commit/373c481a89333f992951785988a17d5e23d1e5e5

If you're okay, I can create a pull request.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Run redfish-finder in command prompt
2.
3.

Actual results:
Fail -> AttributeError: ServiceConfig instance has no attribute 'hostname'

Expected results:
The utility can be run without any failure

Additional info:

Comment 2 Neil Horman 2019-07-11 19:13:35 UTC
did you mean to only open this for RHEL7?  I would have though there would be another bz for RHEL8 somewhere.  I can clone it if you didn't do that

Comment 3 Adrian Huang 2019-07-12 01:58:04 UTC
(In reply to Neil Horman from comment #2)
> did you mean to only open this for RHEL7?  I would have though there would
> be another bz for RHEL8 somewhere.  I can clone it if you didn't do that

Ah, we need another bz for RHEL8. I'll do that.

Comment 4 Neil Horman 2019-07-17 15:37:51 UTC
Ok, it looks like this is the result of being run on a system that has no redfish bmc support at all.  I can fix this, but just so that you are aware, the fix will result in redfish-finder exiting indicating that the system has no redfish capabilities.

Comment 5 Neil Horman 2019-07-17 15:39:18 UTC
sorry, scratch that last update, meant for a different bz

Comment 6 Neil Horman 2019-07-30 17:15:37 UTC
comitted for rhel-7.8, waiting on errata tool to open for 7.8 filing

Comment 8 Neil Horman 2019-09-04 12:27:53 UTC
sorry for the late reply here steve, the work on this bug has been done and comitted for some time, but it appears that redfish-finder isn't on the ACL for 7.8, so this will likely need to get bumped to 7.9, or closed wontfix.

Comment 10 Beth Uptagrafft 2020-01-13 20:05:28 UTC
setting back to assigned for further review

Comment 16 errata-xmlrpc 2020-09-29 19:58:20 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 (redfish-finder bug fix and enhancement update), 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/RHBA-2020:3935


Note You need to log in before you can comment on or make changes to this bug.