import nmstate-2.1.4-2.el9_1
This commit is contained in:
parent
3e98650bff
commit
849379d059
49
SOURCES/BZ-2148394_nm-Fix-moving-bridge-port-to-bond.patch
Normal file
49
SOURCES/BZ-2148394_nm-Fix-moving-bridge-port-to-bond.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From d10202dee84756acff0be7144bbf0dd3f415f57a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gris Ge <fge@redhat.com>
|
||||||
|
Date: Tue, 30 Aug 2022 22:54:44 +0800
|
||||||
|
Subject: [PATCH] nm: Fix moving bridge port to bond
|
||||||
|
|
||||||
|
When moving bridge port with VLAN filtering setting to bond, we got
|
||||||
|
failure:
|
||||||
|
A connection with a 'bridge-port' setting must have the slave-type
|
||||||
|
set to 'bridge'. Instead it is 'bond'
|
||||||
|
|
||||||
|
The root cause is we forgot to remove `NmSettingBridgePort` when
|
||||||
|
detaching port away from bridge.
|
||||||
|
|
||||||
|
The fix is remove `NmSettingBridgePort` and
|
||||||
|
`NmSettingOvsBridgeInterface` if not bridge port or OVS interface
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
Integration test cases for linux bridge and OVS bridge are included.
|
||||||
|
|
||||||
|
Signed-off-by: Gris Ge <fge@redhat.com>
|
||||||
|
(cherry picked from commit d2c40c3aade1d7764b84f0aafe8d3d907bb1c4a6)
|
||||||
|
---
|
||||||
|
rust/src/lib/nm/connection.rs | 8 ++++++++
|
||||||
|
tests/integration/linux_bridge_test.py | 15 ++++++++++++++-
|
||||||
|
tests/integration/ovs_test.py | 20 +++++++++++++++++++-
|
||||||
|
3 files changed, 41 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/rust/src/lib/nm/connection.rs b/rust/src/lib/nm/connection.rs
|
||||||
|
index 7fbf2631..91bd9077 100644
|
||||||
|
--- a/rust/src/lib/nm/connection.rs
|
||||||
|
+++ b/rust/src/lib/nm/connection.rs
|
||||||
|
@@ -279,6 +279,14 @@ pub(crate) fn iface_to_nm_connections(
|
||||||
|
_ => (),
|
||||||
|
};
|
||||||
|
|
||||||
|
+ if nm_conn.controller_type() != Some(NM_SETTING_BRIDGE_SETTING_NAME) {
|
||||||
|
+ nm_conn.bridge_port = None;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if nm_conn.controller_type() != Some(NM_SETTING_OVS_PORT_SETTING_NAME) {
|
||||||
|
+ nm_conn.ovs_iface = None;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if let Some(Interface::LinuxBridge(br_iface)) = ctrl_iface {
|
||||||
|
gen_nm_br_port_setting(br_iface, &mut nm_conn);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: nmstate
|
Name: nmstate
|
||||||
Version: 2.1.4
|
Version: 2.1.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Declarative network manager API
|
Summary: Declarative network manager API
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/%{srcname}/%{srcname}
|
URL: https://github.com/%{srcname}/%{srcname}
|
||||||
@ -12,6 +12,7 @@ Source0: https://github.com/nmstate/nmstate/releases/download/v%{version}
|
|||||||
Source1: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-%{version}.tar.gz.asc
|
Source1: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-%{version}.tar.gz.asc
|
||||||
Source2: https://nmstate.io/nmstate.gpg
|
Source2: https://nmstate.io/nmstate.gpg
|
||||||
Source3: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-vendor-%{version}.tar.xz
|
Source3: https://github.com/nmstate/nmstate/releases/download/v%{version}/nmstate-vendor-%{version}.tar.xz
|
||||||
|
Patch0: BZ-2148394_nm-Fix-moving-bridge-port-to-bond.patch
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
@ -78,6 +79,7 @@ This package contains the Python 3 library for Nmstate.
|
|||||||
gpg2 --import --import-options import-export,import-minimal %{SOURCE2} > ./gpgkey-mantainers.gpg
|
gpg2 --import --import-options import-export,import-minimal %{SOURCE2} > ./gpgkey-mantainers.gpg
|
||||||
gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0}
|
gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0}
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
pushd rust
|
pushd rust
|
||||||
# Source3 is vendored dependencies
|
# Source3 is vendored dependencies
|
||||||
@ -150,6 +152,9 @@ popd
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Nov 26 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 2.1.4-2
|
||||||
|
- Fix moving bridge port to bond. RHBZ#2148394
|
||||||
|
|
||||||
* Mon Aug 15 2022 Gris Ge <fge@rehda.tcom> - 2.1.4-1
|
* Mon Aug 15 2022 Gris Ge <fge@rehda.tcom> - 2.1.4-1
|
||||||
- Upgrade to 2.1.4
|
- Upgrade to 2.1.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user