From 556348e26cca921f5d404fb1ce8a24c343236075 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Sun, 16 Jun 2024 09:12:09 +0200 Subject: [PATCH] Do not create default wired connections for bond ports Resolves: RHEL-38451 --- pyanaconda/modules/network/initialization.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pyanaconda/modules/network/initialization.py b/pyanaconda/modules/network/initialization.py index b20dbcf3f19..5679ad26939 100644 --- a/pyanaconda/modules/network/initialization.py +++ b/pyanaconda/modules/network/initialization.py @@ -260,14 +260,19 @@ def _run(self, nm_client): # We have to dump persistent ifcfg files for ports created in initramfs # Filter out potenital connection created for BOOTIF option rhbz#2175664 port_cons = [c for c in available_cons if not is_bootif_connection(c)] - if len(port_cons) == 1 and initramfs_cons: - log.debug("%s: device %s has an initramfs port connection", - self.name, iface) - dumped_con = self._select_persistent_connection_for_device( - device, port_cons, allow_ports=True) + if initramfs_cons: + if len(port_cons) == 1: + log.debug("%s: port device %s has an initramfs port connection", + self.name, iface) + dumped_con = self._select_persistent_connection_for_device( + device, port_cons, allow_ports=True) + else: + log.debug("%s: port device %s has an initramfs connection", + self.name, iface) else: - log.debug("%s: creating default connection for port device %s", + log.debug("%s: not creating default connection for port device %s", self.name, iface) + continue if not dumped_con: dumped_con = self._select_persistent_connection_for_device(device, available_cons)