From 6c4f3ebb5e1613d00e1a5f7b627893b7844783c4 Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Wed, 4 Oct 2023 17:16:01 +0300 Subject: [PATCH] Implemented connectivity checking via MSVSphere infrastructure --- SOURCES/20-connectivity-msvsphere.conf | 10 +++++++ SPECS/NetworkManager.spec | 41 ++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 SOURCES/20-connectivity-msvsphere.conf diff --git a/SOURCES/20-connectivity-msvsphere.conf b/SOURCES/20-connectivity-msvsphere.conf new file mode 100644 index 0000000..04cc3e5 --- /dev/null +++ b/SOURCES/20-connectivity-msvsphere.conf @@ -0,0 +1,10 @@ +# Enable connectivity checking for NetworkManager. +# See `man NetworkManager.conf`. +# +# Note that connectivity checking works badly with rp_filter set to +# strict. Check "/proc/sys/net/ipv4/conf/*/rp_filter". +[connectivity] +enabled=true +uri=http://static.inferitos.ru/test/check-networkmanager.txt +response=OK +interval=300 diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 9498807..c5b7861 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -80,11 +80,16 @@ %else %bcond_with connectivity_fedora %endif +%if 0%{?msvsphere} && 0%{?msvsphere} >= 8 +%bcond_without connectivity_msvsphere +%else +%bcond_with connectivity_msvsphere %if 0%{?rhel} && 0%{?rhel} >= 8 %bcond_without connectivity_redhat %else %bcond_with connectivity_redhat %endif +%endif # end of MSVSphere block %if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 %bcond_without crypto_gnutls %else @@ -183,7 +188,7 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: %{epoch_version} Version: %{rpm_version} -Release: %{release_version}%{?snap}%{?dist} +Release: %{release_version}%{?snap}%{?dist}.inferit Group: System Environment/Base License: GPLv2+ and LGPLv2+ URL: https://networkmanager.dev/ @@ -196,6 +201,9 @@ Source5: 20-connectivity-redhat.conf Source6: 70-nm-connectivity.conf Source7: readme-ifcfg-rh.txt +# MSVSphere sources +Source1000: 20-connectivity-msvsphere.conf + # RHEL downstream patches that change behavior from upstream. # These are not bugfixes, hence they are also relevant after # the next rebase of the source tarball. @@ -523,6 +531,17 @@ This adds a NetworkManager configuration file to enable connectivity checking via Red Hat infrastructure. %endif +%if %{with connectivity_msvsphere} +%package config-connectivity-msvsphere +Summary: NetworkManager config file for connectivity checking via MSVSphere servers +Group: System Environment/Base +BuildArch: noarch +Provides: NetworkManager-config-connectivity = %{epoch}:%{version}-%{release} + +%description config-connectivity-msvsphere +This adds a NetworkManager configuration file to enable connectivity checking +via MSVSphere infrastructure. +%endif %package config-server Summary: NetworkManager config file for "server-like" defaults @@ -916,6 +935,12 @@ mkdir -p %{buildroot}%{_sysctldir} cp %{SOURCE6} %{buildroot}%{_sysctldir} %endif +%if %{with connectivity_msvsphere} +cp %{SOURCE1000} %{buildroot}%{nmlibdir}/conf.d/ +mkdir -p %{buildroot}%{_sysctldir} +cp %{SOURCE6} %{buildroot}%{_sysctldir} +%endif + %if 0%{?ifcfg_warning} cp %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts %endif @@ -1204,6 +1229,14 @@ fi %endif +%if %{with connectivity_msvsphere} +%files config-connectivity-msvsphere +%dir %{nmlibdir} +%dir %{nmlibdir}/conf.d +%{nmlibdir}/conf.d/20-connectivity-msvsphere.conf +%{_sysctldir}/70-nm-connectivity.conf +%endif + %files config-server %dir %{nmlibdir} %dir %{nmlibdir}/conf.d @@ -1253,7 +1286,11 @@ fi %changelog -* Wed Aug 30 2023 Fernando Fernandez Mancera - 1:1.44.0-3 +* Wed Oct 04 2023 Sergey Cherevko - 1:1.44.0-3.inferit +- Implemented connectivity checking via MSVSphere infrastructure (adapted patch by Eugene Zamriy for 9.2) +- Rebuilt for MSVSphere 9.3 + +* Wed Aug 30 2023 Fernando Fernandez Mancera - 1:1.44.0-3 - checkpoint: Fix segfault crash when rollback (rhel-1526) * Wed Aug 23 2023 Fernando Fernandez Mancera - 1:1.44.0-2