Mellanox NICs' ifcfg-scripts should not be removed when no CONFIG change exists
os-net-config is triggering reconfiguration/flapping of mellanox nics even when there are no changes in the NIC configs. Added check to NOT remove ifcfg-* scripts for Mellonox NICs when DPDK/Bond is enabled Resolves: rhbz#2131248 Change-Id: Ida0c78ba7784d452165999af4dd955b0129cfdaf
This commit is contained in:
parent
84f11c7468
commit
e752fbac78
|
@ -52,6 +52,7 @@ def remove_ifcfg_config(ifname):
|
|||
if re.match(r'[\w-]+$', ifname):
|
||||
ifcfg_file = ifcfg_config_path(ifname)
|
||||
if os.path.exists(ifcfg_file):
|
||||
logger.info('removing existing ifcfg script for intf: %s' % ifname)
|
||||
os.remove(ifcfg_file)
|
||||
|
||||
|
||||
|
@ -995,7 +996,7 @@ class IfcfgNetConfig(os_net_config.NetConfig):
|
|||
|
||||
# Bind the dpdk interface
|
||||
utils.bind_dpdk_interfaces(ifname, ovs_dpdk_port.driver, self.noop)
|
||||
if not self.noop:
|
||||
if not self.noop and (not common.is_mellanox_interface(ifname)):
|
||||
remove_ifcfg_config(ifname)
|
||||
|
||||
data = self._add_common(ovs_dpdk_port)
|
||||
|
@ -1025,7 +1026,7 @@ class IfcfgNetConfig(os_net_config.NetConfig):
|
|||
# checks are added at the object creation stage.
|
||||
ifname = dpdk_port.members[0].name
|
||||
utils.bind_dpdk_interfaces(ifname, dpdk_port.driver, self.noop)
|
||||
if not self.noop:
|
||||
if not self.noop and (not common.is_mellanox_interface(ifname)):
|
||||
remove_ifcfg_config(ifname)
|
||||
|
||||
data = self._add_common(ovs_dpdk_bond)
|
||||
|
|
Loading…
Reference in New Issue