From 1093627bd62d84c09dd11d8dbf6ec7deae2cde30 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2020 01:55:49 +0000 Subject: import sbd-1.4.1-5.el8 --- diff --git a/SOURCES/0003-Fix-sbd-pacemaker-handle-new-no_quorum_demote.patch b/SOURCES/0003-Fix-sbd-pacemaker-handle-new-no_quorum_demote.patch new file mode 100644 index 0000000..10602b7 --- /dev/null +++ b/SOURCES/0003-Fix-sbd-pacemaker-handle-new-no_quorum_demote.patch @@ -0,0 +1,71 @@ +From 3048119bf4a0ddb2da01d4ca827ae659a089b622 Mon Sep 17 00:00:00 2001 +From: Klaus Wenninger +Date: Wed, 24 Jun 2020 14:33:21 +0200 +Subject: [PATCH] Fix: sbd-pacemaker: handle new no_quorum_demote + +and be robust against unknown no-quorum-policies handling them +as would be done with no_quorum_suicide +--- + configure.ac | 17 ++++++++++++++++- + src/sbd-pacemaker.c | 11 ++++++++++- + 2 files changed, 26 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 02e2678..3391c5f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -89,7 +89,22 @@ AC_CHECK_LIB(cib, cib_apply_patch_event, , missing="yes") + + dnl pacemaker-2.0 removed support for corosync 1 cluster layer + AC_CHECK_DECLS([pcmk_cluster_classic_ais, pcmk_cluster_cman],,, +- [#include ]) ++ [#include ]) ++ ++dnl check for additional no-quorum-policies ++dnl AC_TEST_NO_QUORUM_POLICY(POLICY) ++AC_DEFUN([AC_TEST_NO_QUORUM_POLICY],[ ++ AC_MSG_CHECKING([whether enum pe_quorum_policy defines value $1]) ++ AC_LANG_PUSH([C]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( ++ [#include ], ++ [enum pe_quorum_policy policy = $1; return policy;])], ++ AC_DEFINE_UNQUOTED(m4_toupper(HAVE_ENUM_$1), 1, ++ [Does pe_types.h have $1 value in enum pe_quorum_policy?]) ++ AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) ++ AC_LANG_POP([C]) ++]) ++AC_TEST_NO_QUORUM_POLICY(no_quorum_demote) + + dnl check for new pe-API + AC_CHECK_FUNCS(pe_new_working_set) +diff --git a/src/sbd-pacemaker.c b/src/sbd-pacemaker.c +index 11e104d..6e53557 100644 +--- a/src/sbd-pacemaker.c ++++ b/src/sbd-pacemaker.c +@@ -321,13 +321,22 @@ compute_status(pe_working_set_t * data_set) + case no_quorum_freeze: + set_servant_health(pcmk_health_transient, LOG_INFO, "Quorum lost: Freeze resources"); + break; ++#if HAVE_ENUM_NO_QUORUM_DEMOTE ++ case no_quorum_demote: ++ set_servant_health(pcmk_health_transient, LOG_INFO, ++ "Quorum lost: Demote promotable resources and stop others"); ++ break; ++#endif + case no_quorum_stop: + set_servant_health(pcmk_health_transient, LOG_INFO, "Quorum lost: Stop ALL resources"); + break; + case no_quorum_ignore: + set_servant_health(pcmk_health_transient, LOG_INFO, "Quorum lost: Ignore"); + break; +- case no_quorum_suicide: ++ default: ++ /* immediate reboot is the most excessive action we take ++ use for no_quorum_suicide and everything we don't know yet ++ */ + set_servant_health(pcmk_health_unclean, LOG_INFO, "Quorum lost: Self-fence"); + break; + } +-- +1.8.3.1 + diff --git a/SPECS/sbd.spec b/SPECS/sbd.spec index eca754b..1123a9c 100644 --- a/SPECS/sbd.spec +++ b/SPECS/sbd.spec @@ -18,7 +18,7 @@ %global commit 25fce8a7d5e8cd5abc2379077381b10bd6cec183 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global github_owner Clusterlabs -%global buildnum 3 +%global buildnum 5 Name: sbd Summary: Storage-based death @@ -30,6 +30,7 @@ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz Patch1: 0001-Fix-regressions.sh-make-parameter-passing-consistent.patch Patch2: 0002-Doc-add-environment-section-to-man-page.patch +Patch3: 0003-Fix-sbd-pacemaker-handle-new-no_quorum_demote.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -155,6 +156,16 @@ fi %{_libdir}/libsbdtestbed* %changelog +* Wed Jun 24 2020 Klaus Wenninger - 1.4.1-5 +- rebuild against pacemaker having new no_quorum_demote + + Resolves: rhbz#1850078 + +* Wed Jun 24 2020 Klaus Wenninger - 1.4.1-4 +- handle new no_quorum_demote in pacemaker + + Resolves: rhbz#1850078 + * Mon Feb 17 2020 Klaus Wenninger - 1.4.1-3 - append the man-page by a section auto-generated from sbd.sysconfig