import nmstate-1.3.3-1.el8

This commit is contained in:
CentOS Sources 2022-11-08 01:33:06 -05:00 committed by Stepan Oksanichenko
parent 7e45ffbd4b
commit 993dc618da
9 changed files with 49 additions and 277 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/nmstate-1.2.1.tar.gz
SOURCES/nmstate-rust-vendor-1.2.1.tar.xz
SOURCES/nmstate-1.3.3.tar.gz
SOURCES/nmstate-vendor-1.3.3.tar.xz
SOURCES/nmstate.gpg

View File

@ -1,3 +1,3 @@
d47ab133f1d83391a6b617e1674fe2dec92bf536 SOURCES/nmstate-1.2.1.tar.gz
ee514e17040057d2e83efaf16c2f9779cfe42e8b SOURCES/nmstate-rust-vendor-1.2.1.tar.xz
b5f872551d434e2c62b30d70471efaeede83ab44 SOURCES/nmstate.gpg
b974ce77195e7ca1f2afb64628e666a3c7141e14 SOURCES/nmstate-1.3.3.tar.gz
79b68a9f6ba77aa670fafc6b29851b76df1b4c20 SOURCES/nmstate-vendor-1.3.3.tar.xz
5c1d9d65f9db4fedc9dc96e0fb6cac0a86749c88 SOURCES/nmstate.gpg

View File

@ -1,78 +0,0 @@
From c2aa72122d811180ae8c8f7f4fcb19a251024528 Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Fri, 29 Apr 2022 14:25:53 +0800
Subject: [PATCH] ovs: Do not validate on non-desired interface
Currently nmstate is showing unmanaged ovs vxlan with empty parent which
failure the apply() even it is not mentioned in desire state.
The fix is skip all the validations on non-desired interfaces.
Integration test case included.
Signed-off-by: Gris Ge <fge@redhat.com>
---
libnmstate/ifaces/ifaces.py | 14 ++++++++++----
tests/integration/ovs_test.py | 26 ++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/libnmstate/ifaces/ifaces.py b/libnmstate/ifaces/ifaces.py
index c2a5d3c4..c2f9bfa9 100644
--- a/libnmstate/ifaces/ifaces.py
+++ b/libnmstate/ifaces/ifaces.py
@@ -159,7 +159,8 @@ class Ifaces:
self._apply_copy_mac_from()
self.gen_metadata()
for iface in self.all_ifaces():
- iface.pre_edit_validation_and_cleanup()
+ if iface.is_desired and iface.is_up:
+ iface.pre_edit_validation_and_cleanup()
self._pre_edit_validation_and_cleanup()
@@ -293,7 +294,11 @@ class Ifaces:
When OVS patch peer does not exist or is down, raise an error.
"""
for iface in self._kernel_ifaces.values():
- if iface.type == InterfaceType.OVS_INTERFACE and iface.is_up:
+ if (
+ iface.type == InterfaceType.OVS_INTERFACE
+ and iface.is_up
+ and iface.is_desired
+ ):
if iface.peer:
peer_iface = self._kernel_ifaces.get(iface.peer)
if not peer_iface or not peer_iface.is_up:
@@ -315,9 +320,9 @@ class Ifaces:
Validate that vlan is not being created over infiniband interface
"""
for iface in self._kernel_ifaces.values():
-
if (
iface.type in [InterfaceType.VLAN, InterfaceType.VXLAN]
+ and iface.is_desired
and iface.is_up
):
if (
@@ -338,9 +343,9 @@ class Ifaces:
If base MTU is not present, set same as vlan MTU
"""
for iface in self._kernel_ifaces.values():
-
if (
iface.type in [InterfaceType.VLAN, InterfaceType.VXLAN]
+ and iface.is_desired
and iface.is_up
and iface.mtu
):
@@ -423,6 +428,7 @@ class Ifaces:
for ifname, iface in self._kernel_ifaces.items():
if (
iface.type == InterfaceType.VETH
+ and iface.is_desired
and iface.is_up
and not iface.peer
):
--
2.35.1

View File

@ -1,60 +0,0 @@
From bc677dc4f356a89a9af5cf45e80d31afff44c6d7 Mon Sep 17 00:00:00 2001
From: Fernando Fernandez Mancera <ffmancera@riseup.net>
Date: Fri, 25 Mar 2022 13:27:16 +0100
Subject: [PATCH] python, bridge: clear vlan filtering when set empty
When the user specifies 'vlan: {}', Nmstate should clear the vlan
configuration for that port instead of merging it.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
(cherry picked from commit 8b87c7d533dfb568f9a1715d7b2c59c415c9470a)
---
libnmstate/ifaces/linux_bridge.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/libnmstate/ifaces/linux_bridge.py b/libnmstate/ifaces/linux_bridge.py
index ce331692..950e8c9e 100644
--- a/libnmstate/ifaces/linux_bridge.py
+++ b/libnmstate/ifaces/linux_bridge.py
@@ -124,15 +124,38 @@ class LinuxBridgeIface(BridgeIface):
def gen_metadata(self, ifaces):
super().gen_metadata(ifaces)
if not self.is_absent:
+ original_ports_config = self.original_desire_dict.get(
+ LinuxBridge.CONFIG_SUBTREE, {}
+ ).get(LinuxBridge.PORT_SUBTREE, [])
for port_config in self.port_configs:
port_iface = ifaces.all_kernel_ifaces.get(
port_config[LinuxBridge.Port.NAME]
)
if port_iface:
+ original_port = self._get_port_config(
+ original_ports_config, port_iface.name
+ )
+ if (
+ original_port
+ and original_port.get(
+ LinuxBridge.Port.VLAN_SUBTREE, None
+ )
+ == {}
+ ):
+ port_config[
+ LinuxBridge.Port.VLAN_SUBTREE
+ ] = original_port.get(LinuxBridge.Port.VLAN_SUBTREE)
port_iface.update(
{BridgeIface.BRPORT_OPTIONS_METADATA: port_config}
)
+ def _get_port_config(self, ports, port_name):
+ for port_config in ports:
+ if port_config[LinuxBridge.Port.NAME] == port_name:
+ return port_config
+
+ return None
+
def remove_port(self, port_name):
if self._bridge_config:
self.raw[LinuxBridge.CONFIG_SUBTREE][LinuxBridge.PORT_SUBTREE] = [
--
2.35.1

View File

@ -1,72 +0,0 @@
From 81d78014be4b985c8f86159d7abed6a9f73b128c Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Thu, 28 Apr 2022 21:20:26 +0800
Subject: [PATCH] nm bridge: Fix multicast_router option
Adding the missing support of multicast_router option of linux bridge
with these values:
* 0: disabled
* 1: auto
* 2: enabled
Integration test case included and marked as tier 1 as oVirt requested
this.
Signed-off-by: Gris Ge <fge@redhat.com>
---
libnmstate/nm/bridge.py | 20 ++++++++++++++++++++
tests/integration/linux_bridge_test.py | 22 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/libnmstate/nm/bridge.py b/libnmstate/nm/bridge.py
index e7d28e2b..4241c926 100644
--- a/libnmstate/nm/bridge.py
+++ b/libnmstate/nm/bridge.py
@@ -17,6 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
+from libnmstate.error import NmstateNotImplementedError
from libnmstate.schema import LinuxBridge as LB
from .bridge_port_vlan import nmstate_port_vlan_to_nm
@@ -42,6 +43,12 @@ NM_BRIDGE_OPTIONS_MAP = {
OPT.MULTICAST_STARTUP_QUERY_INTERVAL: "multicast_startup_query_interval",
}
+NM_BRIDGE_MCAST_ROUTER_VALUE_MAP = {
+ 0: "disabled",
+ 1: "auto",
+ 2: "enabled",
+}
+
def create_setting(
bridge_state, base_con_profile, original_desired_iface_state
@@ -80,6 +87,8 @@ def _set_bridge_properties(bridge_setting, options):
bridge_setting.props.multicast_snooping = val
elif key == LB.STP_SUBTREE:
_set_bridge_stp_properties(bridge_setting, val)
+ elif key == LB.Options.MULTICAST_ROUTER:
+ _set_bridge_mcast_router(bridge_setting, val)
elif key in NM_BRIDGE_OPTIONS_MAP:
nm_prop_name = NM_BRIDGE_OPTIONS_MAP[key]
# NM is using the sysfs name
@@ -138,3 +147,14 @@ def create_port_setting(options, base_con_profile):
def get_port(nm_device):
return nm_device.get_slaves()
+
+
+def _set_bridge_mcast_router(bridge_setting, nmstate_value):
+ nm_value = NM_BRIDGE_MCAST_ROUTER_VALUE_MAP.get(nmstate_value)
+ if nm_value:
+ bridge_setting.props.multicast_router = nm_value
+ else:
+ raise NmstateNotImplementedError(
+ f"Unsupported value {nmstate_value} for "
+ "multicast_router bridge option"
+ )
--
2.35.3

View File

@ -1,31 +0,0 @@
From e1297610307287960290b9a8e87c75acf2b74e6a Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Sun, 3 Jul 2022 17:06:12 +0800
Subject: [PATCH] sriov: Only verify SRIOV VF when desired
Skip the verification on SR-IOV if desire state does not mentioned so.
Unit test case included.
Signed-off-by: Gris Ge <fge@redhat.com>
---
libnmstate/ifaces/ethernet.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libnmstate/ifaces/ethernet.py b/libnmstate/ifaces/ethernet.py
index 720deab7..f3a843c0 100644
--- a/libnmstate/ifaces/ethernet.py
+++ b/libnmstate/ifaces/ethernet.py
@@ -152,6 +152,9 @@ def verify_sriov_vf(iface, cur_ifaces):
and (iface.is_desired or iface.is_changed)
and iface.type == InterfaceType.ETHERNET
and iface.sriov_total_vfs > 0
+ and iface.original_desire_dict.get(Ethernet.CONFIG_SUBTREE, {}).get(
+ Ethernet.SRIOV_SUBTREE
+ )
):
return
cur_iface = cur_ifaces.get_iface(iface.name, iface.type)
--
2.31.1

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8f1XsqXpyNthgIbGbM3lj+QeKP8FAmIKEdcACgkQbM3lj+Qe
KP/qUw//UUp2FkgRKtVwmv0uCv3o7DlQAmj5nHmoEgQpRvjzVQZsDIlJzTv2h7/X
O44rQmJPbtqgyQE34mc3uioXtttiIhiwJtkgK4mYe1uQRD1txy9DgTPZMoRJWbi5
vallg5jfPmUBENcMpLrcBZgJo6IRGQBZBpC0rNPfhufNjvVNSAyvARyzTXFaxaDx
ajRYoFHnW38lOhx3Dyz5jtkPsDtq3oLsVI1G/xpeLOGc/SpCDcJJac70ODlJKOrC
Zve9xnOdIrjfnI1QLdZ0gH8rAyreOFqRiPm+jyGuyxw9OIcdWxT37pr7s8I2/ct8
C+qsMOyqY63O01uus9JidbEIbivdaP5l0xFS51tIt/XEt0PCJ64rA0q/RdBGd5v1
V5h+K1ptQvdAmYI11LtLJDIvLYTc6KeFcjNRfT0s2GO/KFkYrVe1dq+yFj2sCB2u
DD6UnZUzE2bUzN5lumqBQEmMSi2H6cTVLQYbif8iJbCgPM71JAio5gYmOC5VBp8P
yaMKBFBYPwQAIZDN71shDVRT9BttRMAnBFOdPLqm03ht9BgkYihbbAZlNUipVrN0
SIhsPZNc53psWH6ehDqYF8gJHucxZBipPd/qslzxhUJpn5Y4gITHJkrnFunz+4Cs
qv01LQrvn7RMz2P13YN5GzLY7WDRcjNO6aj0adgHyO9PI8wSMsc=
=Arcd
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEfUQ+BAINyWGvqJXerIciWuEsPqMFAmL1I2QACgkQrIciWuEs
PqMfiw//dfPsrRLLyMwEde0SWMEnaHvTwks38OXZN6p8cKk+sWF8DXwmQy5/PAwn
LRj7CrQ7zBsjFBtLmiV8HtT4zpAyt40N1x2IhnPHw8GzGOc6stQZ+SpNf3nDRolU
ambnnfSVN/D2DQN0RNbKDqFVa3+1sLSaygC7SxI0it+pZHRQmz98Q1CTJMQawRby
qG8Rqn93YN9PRxjqihcUN4P+L4rfN3b+hGzzKs1Hfhp6Jcj783JCFGmLNiK+AVjo
MrM17T6ZRtJJAzNLjaPNXKIvOH7hb4smEX5GAb9EDYA4OlH2hwy6J+7zg9eG5ovu
Rs3gpB/iYgEt0UBLpmKWax3ScplU5sIX483wgAq9S5ldciWFbojNYDG1uygqS4WT
KHeBhNP3DmX8T92RTp8Zla44HKedmsgSblTG++xT38SQxT/12N7X+NSp0LqSKCFq
lAplMql7RZDji7BgYOhwTEU9FOEZ6GZnEZAjkWfraw98t2yQnCHhBXNtkhlQPfiK
oZ+vLv7N2peP1c4g+y7yQBCNlehDNp0LFURYoJUVBcHBWkgqJNz7+gv6BBZNVOAh
RdHi/AGzgCKHW1RrNInZmdA1FXc1djeBQbsv72UtgMiDniPMCZbm4Ok8XEwvNNyE
69aTgdst+xhQlklLSyKNergvQ5UYLNZo8GKVdVck2T1w6es3tKo=
=dK0O
-----END PGP SIGNATURE-----

View File

@ -3,19 +3,15 @@
%define libname libnmstate
Name: nmstate
Version: 1.2.1
Release: 4%{?dist}
Version: 1.3.3
Release: 1%{?dist}
Summary: Declarative network manager API
License: LGPLv2+
URL: https://github.com/%{srcname}/%{srcname}
Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc
Source2: https://www.nmstate.io/nmstate.gpg
Source3: nmstate-rust-vendor-%{version}.tar.xz
Patch0: BZ_2080530-python-bridge-clear-vlan-filtering-when-set-empty.patch
Patch1: BZ_2080528-ovs-Do-not-validate-on-non-desired-interface.patch
Patch2: BZ_2088373-nm-bridge-Fix-multicast_router-option.patch
Patch3: BZ_2108632-sriov-Only-verify-SRIOV-VF-when-desired.patch
Source3: %{url}/releases/download/v%{version}/%{srcname}-vendor-%{version}.tar.xz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: gnupg2
@ -106,7 +102,10 @@ popd
%install
%py3_install
pushd rust
env SKIP_PYTHON_INSTALL=1 PREFIX=%{_prefix} LIBDIR=%{_libdir} %make_install
env SKIP_PYTHON_INSTALL=1 \
PREFIX=%{_prefix} \
LIBDIR=%{_libdir} \
%make_install
popd
%files
@ -147,15 +146,29 @@ popd
/sbin/ldconfig
%changelog
* Thu Jul 14 2022 Gris Ge <fge@redhat.com> - 1.2.1-4
- Skip verification on SRIOV if not desired. RHBZ#2108632
* Mon Aug 15 2022 Gris Ge <fge@redhat.com> - 1.3.3-1
- Upgrade to nmstate-1.3.3
* Tue May 24 2022 Fernando Fernandez Mancera - 1.2.1-3
- Fix disable multicast-router for linux bridge. RHBZ#2088373
* Tue Aug 02 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.2-1
- Upgrade to nmstate-1.3.2
* Wed May 04 2022 Fernando Fernandez Mancera - 1.2.1-2
- Fix ovs vxlan base-iface error. RHBZ#2080528
- Fix clear linux bridge vlan filtering. RHBZ#2080530
* Wed Jul 20 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.1-1
- Upgrade to nmstate-1.3.1
* Fri Jul 01 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.1-0.alpha.20220701
- Upgrade to nmstate-1.3.1-0.alpha.20220701
* Mon Jun 13 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.0-1
- Upgrade to nmstate-1.3.0-1
* Thu May 05 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.0-0.alpha.20220505
- Upgrade to nmstate-1.3.0.alpha.20220505
* Thu Apr 07 2022 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.3.0-0.alpha.20220407
- Upgrade to nmstate-1.3.0.alpha.20220407
* Thu Mar 10 2022 Gris Ge <fge@redhat.com> - 1.3.0-0.alpha.20220310
Upgrade to nmstate-1.3.0-0.alpha.20220310
* Mon Feb 14 2022 Gris Ge <fge@redhat.com> - 1.2.1-1
- Upgrade to 1.2.1. RHBZ#1996618