Bug 1729343 - [RHEL8] Redfish-finder reports an error if the string "Redfish Service Hostname" is empty
Summary: [RHEL8] Redfish-finder reports an error if the string "Redfish Service Hostna...
Status: ON_QA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: redfish-finder
Version: 8.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.1
Assignee: Neil Horman
QA Contact: Rachel Sibley
Depends On:
Blocks: 1671421 1742929 1755139
TreeView+ depends on / blocked
Reported: 2019-07-12 02:28 UTC by Adrian Huang
Modified: 2020-01-09 05:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Adrian Huang 2019-07-12 02:28:42 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

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>
  File "./redfish-finder", line 520, in main
  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:
                        IPv4 Mask:
                        Redfish Service IP Discovery Type: Static
                        Redfish Service IP Address Format: IPv4
                        IPv4 Redfish Service Address:
                        IPv4 Redfish Service Mask:
                        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

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

How reproducible:

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

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

Expected results:
The utility can be run without any failure

Additional info:

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