代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/nmstate 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b1e94d1aa04f51b2d15711c8e7ab37198b173065 Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Tue, 1 Jun 2021 16:33:15 +0800
Subject: [PATCH] bond: Fix bond fail_over_mac=active
With bond interface in fail_over_mac=active and active-backup mode,
any future change via nmstate will fail as nmstate is validating
on current state instead of desire state for this bond mac restriction.
Fixed the code to only validate bond mac restriction on desired or
changed bond interface.
Integration test case include.
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 138386e..01859b0 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:
+ if self.is_up and (self.is_desired or self.is_changed):
self._discard_bond_option_when_mode_change()
self._validate_bond_mode()
self._fix_mac_restriced_mode()
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。