Hi Philipp,
On Fri, Apr 22, 2022 at 05:30:43PM +0200, Philipp Rudo wrote:
Hi Coiby,
I'm no networking expert so I cannot help much on this part. But all in
all this series looks like a good improvement. Anyway, a first
round with some small comments for minor improvements, though.
Thanks for reviewing the patch set and suggesting various improvements!
Thanks
Philipp
On Sat, 2 Apr 2022 11:23:44 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
> Currently, kexec-tools parses legacy ifcfg-* configuration files or
> NetworkManager .nmconnection connection profiles to build up dracut
> command line parameters like ip=. Then dracut parses these parameters and
> runs nm-initrd-generator to generate NetworkManager connection profiles.
> Taking a bonding network as an example, nm-initrd-generator generates two
> connections as follows,
> $ /usr/libexec/nm-initrd-generator -s -- bootdev=mybond0 rd.neednet
kdumpnic=mybond0 bond=mybond0:kdump-eth0
>
> *** Connection 'mybond0' ***
>
> [connection]
> id=mybond0
> uuid=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
> type=bond
> autoconnect-retries=1
> interface-name=mybond0
> multi-connect=1
> permissions=
>
> [bond]
> mode=balance-rr
>
> [ipv4]
> dhcp-timeout=90
> dns-search=
> method=auto
>
> [ipv6]
> addr-gen-mode=eui64
> dhcp-timeout=90
> dns-search=
> method=auto
>
> [proxy]
>
> *** Connection 'kdump-eth0' ***
>
> [connection]
> id=kdump-eth0
> uuid=ed6a7448-b5f8-4f8a-b718-3e24ea1c924b
> type=ethernet
> autoconnect-retries=1
> interface-name=kdump-eth0
> master=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
> multi-connect=1
> permissions=
> slave-type=bond
> wait-device-timeout=60000
>
> [ethernet]
> mac-address-blacklist=
>
> Later dracut starts NetworkManager to activate these profiles to bring up
> the network connections. This way of seting up kdump network is tedious,
> error-prone and unncessary. A better way is to directly copy the needed
> connection profiles to initrd. A potential benefit of this approach for
> the users is they can simply edit the connection profile directly like
> changing ipv4.dhcp-timeout instead of being forced to use the hard-coded
> value enforced by nm-initrd-generator.
>
> This patch set reuses NetworkManager connection profiles to set up kdump
> network. It also reduces the memory consumption of network drivers and
> fix other issues at the same time. Here are the bug list that addressed by
> this patch set on bugzilla,
> - Bug 1962421 - [RHEL-9]"eth0: Failed to rename network interface 3 from
'eth0' to 'kdump-eth0': File exists"
> - Bug 2064708 - kdump: mkdumprd: failed to make kdump initrd for bridge network on
z15 z/vm
> - bugs related to OOM caused by network driver
> - Bug 1950282 - shutdown those unneeded network interfaces to save memory for
kdump
> - Bug 1958587 - the kdump initramfs includes unnecessary NIC drivers for SSH/NFS
dumping target
> - Bug 1890021 - be2net is using too much memory during kdump
> - Bug 1662202 - [RHEL-8.1] aarch64: hpe-apache crashkernel OOM when dump to
network targe
>
> Coiby Xu (13):
> add function to copy NetworkManage connection profile to the initramfs
> support legacy ifcfg
> ask NM to wait the network device to be available
> don't let NetworkManager manage unneeded network interfaces
> stop dracut 35network-manager from running nm-initrd-generator
> set up kdump network bridge by directly copying NM connection profile
> to initrd
> set up kdump bonding network by directly copying NM connection profile
> to initrd
> fix error for vlan over team network interface
> set up kdump vlan network by directly copying NM connection profile to
> initrd
> set up kdump teaming network by directly copying NM connection profile
> to initrd
> clean up unneeded code after copying .nmconnection to initrd
> address the cases where a NIC has a different name in kdump kernel
> simplify setup_znet by copying connection profile to initrd
>
> dracut-kdump.sh | 18 +-
> dracut-module-setup.sh | 385 ++++++++++++++---------------------------
> 2 files changed, 133 insertions(+), 270 deletions(-)
>
--
Best regards,
Coiby