diff --git a/.corosync-qdevice.metadata b/.corosync-qdevice.metadata index 851f944..2bb1bf5 100644 --- a/.corosync-qdevice.metadata +++ b/.corosync-qdevice.metadata @@ -1 +1 @@ -eb969252c86fb6bd7a4c84213d426f40d0eb5148 SOURCES/corosync-qdevice-3.0.1.tar.gz +8f72eb0d945136a243761c823e9c8ab7f1c14139 SOURCES/corosync-qdevice-3.0.2.tar.gz diff --git a/.gitignore b/.gitignore index 5b34056..8360080 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/corosync-qdevice-3.0.1.tar.gz +SOURCES/corosync-qdevice-3.0.2.tar.gz diff --git a/SOURCES/bz2178715-1-qdevice-Destroy-non-blocking-client-on-failure.patch b/SOURCES/bz2178715-1-qdevice-Destroy-non-blocking-client-on-failure.patch new file mode 100644 index 0000000..227015b --- /dev/null +++ b/SOURCES/bz2178715-1-qdevice-Destroy-non-blocking-client-on-failure.patch @@ -0,0 +1,41 @@ +From 4331c7d5650a8bf44c16512419f1954d0ef96df5 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Mon, 20 Mar 2023 11:01:46 +0100 +Subject: [PATCH] qdevice: Destroy non blocking client on failure + +This fixes regression introduced in patch +8217e33e86bca79dc307e112f0c0c4a278f9a568 which made qdevice assert when +PR_GetError in nss_sock_non_blocking_client_try_next called by +qdevice_model_net_pre_poll_loop returns error other than +PR_IN_PROGRESS_ERROR. This is usually not happening - only way to get +such error seems to be to ifdown ALL network interfaces other than +loopback and returned error is then PR_NETWORK_UNREACHABLE_ERROR +(-5980). + +Fix is rather simple (and present in pre +8217e33e86bca79dc307e112f0c0c4a278f9a568) - just call +nss_sock_non_blocking_client_destroy. + +Signed-off-by: Jan Friesse +--- + qdevices/qdevice-model-net.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/qdevices/qdevice-model-net.c b/qdevices/qdevice-model-net.c +index afcc649..f63e4bd 100644 +--- a/qdevices/qdevice-model-net.c ++++ b/qdevices/qdevice-model-net.c +@@ -211,6 +211,10 @@ qdevice_model_net_pre_poll_loop(struct qdevice_instance *instance) + res = nss_sock_non_blocking_client_try_next(&net_instance->non_blocking_client); + if (res == -1) { + log_nss(LOG_ERR, "Can't connect to qnetd host"); ++ /* ++ * To prevent adding non_blocking_client into loop but still keep loop running ++ */ ++ nss_sock_non_blocking_client_destroy(&net_instance->non_blocking_client); + } + + res = qdevice_net_socket_add_to_main_poll_loop(net_instance); +-- +2.39.1 + diff --git a/SOURCES/bz2180246-1-qdevice-Destroy-non-blocking-client-on-failure.patch b/SOURCES/bz2180246-1-qdevice-Destroy-non-blocking-client-on-failure.patch deleted file mode 100644 index 227015b..0000000 --- a/SOURCES/bz2180246-1-qdevice-Destroy-non-blocking-client-on-failure.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4331c7d5650a8bf44c16512419f1954d0ef96df5 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Mon, 20 Mar 2023 11:01:46 +0100 -Subject: [PATCH] qdevice: Destroy non blocking client on failure - -This fixes regression introduced in patch -8217e33e86bca79dc307e112f0c0c4a278f9a568 which made qdevice assert when -PR_GetError in nss_sock_non_blocking_client_try_next called by -qdevice_model_net_pre_poll_loop returns error other than -PR_IN_PROGRESS_ERROR. This is usually not happening - only way to get -such error seems to be to ifdown ALL network interfaces other than -loopback and returned error is then PR_NETWORK_UNREACHABLE_ERROR -(-5980). - -Fix is rather simple (and present in pre -8217e33e86bca79dc307e112f0c0c4a278f9a568) - just call -nss_sock_non_blocking_client_destroy. - -Signed-off-by: Jan Friesse ---- - qdevices/qdevice-model-net.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/qdevices/qdevice-model-net.c b/qdevices/qdevice-model-net.c -index afcc649..f63e4bd 100644 ---- a/qdevices/qdevice-model-net.c -+++ b/qdevices/qdevice-model-net.c -@@ -211,6 +211,10 @@ qdevice_model_net_pre_poll_loop(struct qdevice_instance *instance) - res = nss_sock_non_blocking_client_try_next(&net_instance->non_blocking_client); - if (res == -1) { - log_nss(LOG_ERR, "Can't connect to qnetd host"); -+ /* -+ * To prevent adding non_blocking_client into loop but still keep loop running -+ */ -+ nss_sock_non_blocking_client_destroy(&net_instance->non_blocking_client); - } - - res = qdevice_net_socket_add_to_main_poll_loop(net_instance); --- -2.39.1 - diff --git a/SPECS/corosync-qdevice.spec b/SPECS/corosync-qdevice.spec index e2445dd..453771b 100644 --- a/SPECS/corosync-qdevice.spec +++ b/SPECS/corosync-qdevice.spec @@ -10,13 +10,13 @@ Name: corosync-qdevice Summary: The Corosync Cluster Engine Qdevice -Version: 3.0.1 +Version: 3.0.2 Release: 1%{?gitver}%{?dist}.1 License: BSD URL: https://github.com/corosync/corosync-qdevice Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz -Patch0: bz2180246-1-qdevice-Destroy-non-blocking-client-on-failure.patch +Patch0: bz2178715-1-qdevice-Destroy-non-blocking-client-on-failure.patch # Runtime bits Requires: corosync >= 2.4.0 @@ -47,7 +47,7 @@ BuildRequires: autoconf automake libtool %prep %setup -q -n %{name}-%{version}%{?gittarver} -%patch0 -p1 -b .bz2180246-1 +%patch0 -p1 -b .bz2178715-1 %build %if %{with runautogen} @@ -210,11 +210,16 @@ fi %{_mandir}/man8/corosync-qnetd.8* %changelog -* Thu Mar 23 2023 Jan Friesse - 3.0.1-1.1 -- Resolves: rhbz#2180246 +* Thu Mar 23 2023 Jan Friesse - 3.0.2-1.1 +- Resolves: rhbz#2178715 -- qdevice: Destroy non blocking client on failure (rhbz#2180246) -- merge upstream commit 4331c7d5650a8bf44c16512419f1954d0ef96df5 (rhbz#2180246) +- qdevice: Destroy non blocking client on failure (rhbz#2178715) +- merge upstream commit 4331c7d5650a8bf44c16512419f1954d0ef96df5 (rhbz#2178715) + +* Thu Nov 03 2022 Jan Friesse - 3.0.2-1 +- Resolves: rhbz#2135862 + +- New upstream release * Mon Nov 23 2020 Jan Friesse - 3.0.1-1 - Resolves: rhbz#1752386