33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 355bc8f052e35084405343a0b94ccf06007c31f3 Mon Sep 17 00:00:00 2001
|
|
From: Gris Ge <fge@redhat.com>
|
|
Date: Wed, 2 Jun 2021 19:53:25 +0800
|
|
Subject: [PATCH] bond: Don't validate current bond status
|
|
|
|
If a bond interface is only marked as changed due to other
|
|
interface(like bridge port list change), its original desire information
|
|
is fully read from current status, there is no need to validate it.
|
|
|
|
The fix is only validate on desired bond interface.
|
|
|
|
Signed-off-by: Gris Ge <fge@redhat.com>
|
|
---
|
|
libnmstate/ifaces/bond.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/libnmstate/ifaces/bond.py b/libnmstate/ifaces/bond.py
|
|
index 01859b0..6311f5f 100644
|
|
--- a/libnmstate/ifaces/bond.py
|
|
+++ b/libnmstate/ifaces/bond.py
|
|
@@ -88,7 +88,7 @@ class BondIface(BaseIface):
|
|
|
|
def pre_edit_validation_and_cleanup(self):
|
|
super().pre_edit_validation_and_cleanup()
|
|
- if self.is_up and (self.is_desired or self.is_changed):
|
|
+ if self.is_up and self.is_desired:
|
|
self._discard_bond_option_when_mode_change()
|
|
self._validate_bond_mode()
|
|
self._fix_mac_restriced_mode()
|
|
--
|
|
2.31.1
|
|
|