Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1933679

Summary: [RHEL-8.4][RHEL-8.5][iscsi]Restart kdump service reports ‘sed: can't read /etc/sysconfig/network/ifcfg-eno1: Not a directory ’
Product: Red Hat Enterprise Linux 8 Reporter: xiaoying yan <yiyan>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: coxu, dracut-maint-list, dtardon, fsumsal, pvalena, ruyang, xiawu
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-049-209.git20220815.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1952397 (view as bug list) Environment:
Last Closed: 2022-11-08 10:48:46 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:    
Bug Blocks: 1952397, 2026666, 2089955    

Comment 3 Coiby 2021-04-22 01:28:36 UTC
Hi xiaoying,

Can you show the result of `ls /etc/sysconfig/network-scripts/`?

I thought this bug has the same root cause as https://bugzilla.redhat.com/show_bug.cgi?id=1919052. In that case, the error should be ‘sed: can't read /etc/sysconfig/network-scripts/ifcfg-eno1: Not a directory ’.

Can you also paste the result of "kdumpctl rebuild" after inserting a line "set -x" to the beginning of the install function in /usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh?
```
install() { 
    set -x 
    local arch 
    ...
}
```

I want to know which line of code cause ‘sed: can't read /etc/sysconfig/network/ifcfg-eno1: Not a directory ’. 

Thanks!

Comment 5 Coiby 2021-04-22 08:11:25 UTC
The root cause of this bug is dracut/modules.d/95iscsi tries to set up ip=eno1:dhcp by parsing /etc/sysconfig/network/ifcfg-eno1 which doesn't exit,
```
install_iscsiroot() { 
    ...
    #follow ifcfg settings for boot protocol
    bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname)
    if [ $bootproto ]; then
        printf 'ip=%s:%s ' ${ifname} ${bootproto}
    else
        printf 'ip=%s:static ' ${ifname}
    fi
```

I notice the upstream dracut has already fixed this issue by using ip_params_for_remote_addr which will check both /etc/sysconfig/network/ifcfg-$ifname and /etc/sysconfig/network-scripts/ifcfg-$ifname.

Btw, for RHEL9, ifcfg scripts are no longer used. So the same error would happen. I'll clone a bug for REHL9.

Comment 11 Coiby 2022-08-02 09:53:44 UTC
Hi Frantisek,

Could you confirm if this bug has been fixed in RHEL 8.6 and 8.7? Thanks!

Comment 12 Frantisek Sumsal 2022-08-04 10:57:01 UTC
(In reply to Coiby from comment #11)
> Hi Frantisek,
> 
> Could you confirm if this bug has been fixed in RHEL 8.6 and 8.7? Thanks!

I don't think so, https://github.com/dracutdevs/dracut/pull/857 is not in RHEL 8 yet.

Comment 19 errata-xmlrpc 2022-11-08 10:48:46 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 (dracut 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-2022:7725