diff --git a/SOURCES/BZ_1904889-do-not-remove-unmanaged-ovs-bridge.patch b/SOURCES/BZ_1904889-do-not-remove-unmanaged-ovs-bridge.patch new file mode 100644 index 0000000..e54c13f --- /dev/null +++ b/SOURCES/BZ_1904889-do-not-remove-unmanaged-ovs-bridge.patch @@ -0,0 +1,38 @@ +From d7393d40aaedeea5dd8291519cddeecdfdabc849 Mon Sep 17 00:00:00 2001 +From: Fernando Fernandez Mancera +Date: Mon, 7 Dec 2020 00:51:19 +0100 +Subject: [PATCH] ifaces: do not remove unmanaged orphan interfaces + +If there are unmanaged OVS interface present in the network state, NM +may report uncomplete information. Therefore, nmstate could consider +them as orphan and remove it when modifying the network state. + +In order to fix this, nmstate should not consider it orphan and remove +it when it is not on desired state or marked as changed. + +Signed-off-by: Fernando Fernandez Mancera +Signed-off-by: Gris Ge +--- + libnmstate/ifaces/ifaces.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libnmstate/ifaces/ifaces.py b/libnmstate/ifaces/ifaces.py +index 1c2ffd5..703e672 100644 +--- a/libnmstate/ifaces/ifaces.py ++++ b/libnmstate/ifaces/ifaces.py +@@ -242,8 +242,10 @@ class Ifaces: + + def _mark_orphen_as_absent(self): + for iface in self._ifaces.values(): +- if iface.need_parent and ( +- not iface.parent or not self._ifaces.get(iface.parent) ++ if ( ++ iface.need_parent ++ and (not iface.parent or not self._ifaces.get(iface.parent)) ++ and (iface.is_desired or iface.is_changed) + ): + iface.mark_as_changed() + iface.state = InterfaceState.ABSENT +-- +2.18.4 + diff --git a/SPECS/nmstate.spec b/SPECS/nmstate.spec index 5d89c6c..5ee980f 100644 --- a/SPECS/nmstate.spec +++ b/SPECS/nmstate.spec @@ -4,7 +4,7 @@ Name: nmstate Version: 0.3.4 -Release: 15%{?dist} +Release: 17%{?dist} Summary: Declarative network manager API License: LGPLv2+ URL: https://github.com/%{srcname}/%{srcname} @@ -23,6 +23,7 @@ Patch9: BZ_1887349-Allow-duplicate-iface-name-in-ovs.patch Patch10: BZ_1890497-nm-bond-Ignore-ad_actor_system-00-00-00-00-00-00.patch Patch11: BZ_1890497-nm.ipv6-call-clear_routing_rules-when-creating-the-s.patch Patch12: BZ_1901571_do_not_check_ovs_daemon_when_showing.patch +Patch13: BZ_1904889-do-not-remove-unmanaged-ovs-bridge.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -93,6 +94,12 @@ gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0} %{python3_sitelib}/%{libname}/plugins/__pycache__/nmstate_plugin_ovsdb* %changelog +* Mon Dec 07 2020 Gris Ge - 0.3.4-17 +- Rebuild to retrigger the CI gating. RHBZ#1904889 + +* Mon Dec 07 2020 Gris Ge - 0.3.4-16 +- Don't remove unmanaged OVS interface. RHBZ#1904889 + * Thu Nov 26 2020 Gris Ge - 0.3.4-15 - Fix `libnmstate.show()` in container with OVS bridge. RHBZ#1901571