Bug 1865738

Summary: 45ifcfg: 85-write-ifcfg.sh can miss writing out bond configuration when using vlan+bonding
Product: Red Hat Enterprise Linux 8 Reporter: Dusty Mabe <dustymabe>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: dracut-maint-list, dtardon, miabbott, timothy.s.swan.ctr
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-04 07:27:13 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:

Description Dusty Mabe 2020-08-04 03:18:54 UTC
Description of problem:

The 85-write-ifcfg.sh pre-pivot hook seems to be able to miss writing out a bond ifcfg file into /tmp/ifcfg/ if it's combined with a vlan.


If I use kernel args like:

```
rd.break=cleanup rd.neednet=1 vlan=bond0.251:bond0 ip=192.168.122.111::192.168.122.1:255.255.255.0:myhostname:bond0.251:none:192.168.122.1 bond=bond0:ens2,ens3:mode=active-backup,miimon=100
```

I see only a single file get created in `/tmp/ifcfg/`:

```
# ls /tmp/ifcfg/
ifcfg-bond0.251

# cat /tmp/ifcfg/ifcfg-bond0.251
# Generated by dracut initrd
NAME="bond0.251"
ONBOOT=yes
NETBOOT=yes
UUID="5235ffc0-ff86-4d90-9583-b4d560e5974b"
BOOTPROTO=none
IPADDR="192.168.122.111"
NETMASK="255.255.255.0"
GATEWAY="192.168.122.1"
TYPE=Vlan
DEVICE="bond0.251"
VLAN=yes
PHYSDEV="bond0"
```

I would expect more files to get created that represent the bond and the slave devices.


If I leave the vlan out of the picture then more files do get created appropriately. With kernel arguments:

```
rd.break=cleanup rd.neednet=1 ip=192.168.122.111::192.168.122.1:255.255.255.0:myhostname:bond0:none:192.168.122.1 bond=bond0:ens2,ens3:mode=active-backup,miimon=100
```

we get:

```
cleanup:/# tail /tmp/ifcfg/* 
==> /tmp/ifcfg/ifcfg-bond0 <==
ONBOOT=yes
NETBOOT=yes
UUID="42aed295-2d2a-4710-b028-e25eceaa523f"
BOOTPROTO=none
IPADDR="192.168.122.111"
NETMASK="255.255.255.0"
GATEWAY="192.168.122.1"
BONDING_OPTS="mode=active-backup miimon=100"
NAME="bond0"
TYPE=Bond

==> /tmp/ifcfg/ifcfg-ens2 <==
# Generated by dracut initrd
NAME="ens2"
TYPE=Ethernet
ONBOOT=yes
NETBOOT=yes
SLAVE=yes
MASTER="bond0"
UUID="b91f34ff-5bd9-4388-9a7a-b9cba9f575f4"
DEVICE="ens2"

==> /tmp/ifcfg/ifcfg-ens3 <==
# Generated by dracut initrd
NAME="ens3"
TYPE=Ethernet
ONBOOT=yes
NETBOOT=yes
SLAVE=yes
MASTER="bond0"
UUID="0c923765-35f4-4bef-9ebf-582d2bd1cf6e"
DEVICE="ens3"
```


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

```
$ rpm -q dracut
dracut-049-70.git20200228.el8.x86_64
```


How reproducible: Always


Steps to Reproduce:
See description


Actual results:

Only ifcfg-bond0.251 in /tmp/ifcfg/


Expected results:

More files getting created that represent the bonds and subordinate devices.


Additional info:

This is on RHCOS 45.82.202007141718-0 tested on rhcos-4.5.2-x86_64-qemu.x86_64.qcow2. This bug was created out of the investigation for https://bugzilla.redhat.com/show_bug.cgi?id=1862146

Comment 3 RHEL Program Management 2022-02-04 07:27:13 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.