From eede47d1e104b568ff3d33ea218094a5b3da4f68 Mon Sep 17 00:00:00 2001 From: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com> Date: Sun, 24 Apr 2022 09:11:20 -0400 Subject: [PATCH] bonding cleanup password issue Peer Interfaes link up and mtu 1500 setup code is brought outside the for loop of the code used to make the host interfaces up Signed-off-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com> --- io/net/bonding.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/io/net/bonding.py b/io/net/bonding.py index 35fd58204..09841aaf0 100755 --- a/io/net/bonding.py +++ b/io/net/bonding.py @@ -517,13 +517,14 @@ def test_cleanup(self): networkinterface.restore_from_backup() except Exception: self.log.info("backup file not availbale, could not restore file.") - try: - for interface in self.peer_interfaces: - peer_networkinterface = NetworkInterface(interface, self.remotehost) - peer_networkinterface.set_mtu("1500") - self.remotehost.remote_session.quit() - except Exception: - self.log.debug("Could not revert peer interface MTU to 1500") + + try: + for interface in self.peer_interfaces: + peer_networkinterface = NetworkInterface(interface, self.remotehost) + peer_networkinterface.set_mtu("1500") + self.remotehost.remote_session.quit() + except Exception: + self.log.debug("Could not revert peer interface MTU to 1500") def error_check(self): if self.err: