Bug 2221932

Summary: [RHEL-9] iSCSI initiator used by iscsid is not the one configured in iBFT firmware but DVD's one
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: anaconda-maint-list, dmarek, japokorn, jfindysz, jkonecny, mfalz, release-test-team-automation, rmetrich, rvykydal, sbarcomb, tbzatek, vtrefny
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-blivet-3.6.0-9.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2084043 Environment:
Last Closed: 2023-11-07 08:32:40 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:
Bug Depends On: 2221935, 2223977    
Bug Blocks:    

Description Jan Stodola 2023-07-11 10:27:01 UTC
+++ This bug was initially created as a clone of Bug #2084043 +++

Description of problem:

I have a customer that is trying to install a system having iBFT firmware support and initiator set in the firmware.
Upon booting on the DVD for installation in GUI mode, the iSCSI panel prefills the initiator name with the initiator found in the firmware and the field is automatically grayed out, which is somehow expected.
However discovery fails because /etc/iscsi/initiator-name was not updated with the iBFT initiator, it's still the one stored on the DVD.
This ends up not finding any target and not being able to fix this, unless the customer switches to a text console, changes /etc/iscsi/initiator-name content and restarts iscsid.service unit.

Unfortunately I don't have the hardware to reproduce.
So far, by stracing much of the components on my lab system, I could find that when setting the initiator field manually (something the customer cannot do since it's grayed out), the following sequence happens:

1. DBus message "SetInitiator" is sent
2. udisksd (udisks2.service unit) spawns a child that changes /etc/iscsi/initiator-name
3. the child connects to the target IP, causing iscsid.service activation to take place

It's unclear to me who retrieved the iBFT firmware value in the first place and populated it in the initiator field.
For sure once the field is populated a "SetInitiator" must be issued since the static file isn't accurate anymore.

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

Anaconda RHEL8.5.0 and RHEL8.6.0

How reproducible:

Always on customer system

Steps to Reproduce:
1. Boot the installation while having iBFT configured
2. Open iSCSI panel and configure Target IP
3. Click on discovery

Actual Result:

iscsid used the DVD initiator instead of iBFT one

Comment 4 Vojtech Trefny 2023-07-20 11:59:17 UTC
PR for RHEL 9: https://github.com/storaged-project/blivet/pull/1147

Comment 8 Jan Stodola 2023-08-14 09:14:01 UTC
Checked that anaconda-34.25.3.8-1.el9 and python-blivet-3.6.0-9.el9 are in nightly compose RHEL-9.3.0-20230812.0.

Executed automated iSCSI tests using compose RHEL-9.3.0-20230812.0 and no regressions have been found.

Moving to VERIFIED.

Comment 10 errata-xmlrpc 2023-11-07 08:32:40 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 (python-blivet 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-2023:6435