* Mon Nov 8 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.2-0.1.rc1

- Update for new upstream tarball for release candidate: Pacemaker-2.1.2-rc1,
  for full details, see included ChangeLog file or
  https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.2-rc1
This commit is contained in:
Klaus Wenninger 2021-11-08 21:40:35 +01:00
parent f78cb3be9e
commit b657441122
10 changed files with 13 additions and 1447 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
From 53dd360f096e5f005e3221e8d44d82d3654b5172 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Wed, 4 Aug 2021 15:57:23 +0200
Subject: [PATCH] Fix: watchdog-fencing: Silence warning without node
restriction
---
lib/fencing/st_client.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c
index 0ff9815..14fa7b2 100644
--- a/lib/fencing/st_client.c
+++ b/lib/fencing/st_client.c
@@ -223,7 +223,6 @@ stonith__watchdog_fencing_enabled_for_node_api(stonith_t *st, const char *node)
*/
crm_warn("watchdog-fencing-query failed");
} else if (list[0] == '\0') {
- crm_warn("watchdog-fencing-query returned an empty list - any node");
rv = TRUE;
} else {
GList *targets = stonith__parse_targets(list);
--
1.8.3.1

View File

@ -1,24 +0,0 @@
From 88e75d5b98df197fa731e7642434951a24a67095 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 10 Aug 2021 09:10:23 +0200
Subject: [PATCH] Fix: fence_watchdog: fix version output needed for help2man
---
daemons/fenced/fence_watchdog.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemons/fenced/fence_watchdog.in b/daemons/fenced/fence_watchdog.in
index c83304f..700065e 100755
--- a/daemons/fenced/fence_watchdog.in
+++ b/daemons/fenced/fence_watchdog.in
@@ -12,6 +12,7 @@ import sys
import atexit
import getopt
+AGENT_VERSION = "1.0.0"
SHORT_DESC = "Dummy watchdog fence agent"
LONG_DESC = """fence_watchdog just provides
meta-data - actual fencing is done by the pacemaker internal watchdog agent."""
--
1.8.3.1

View File

@ -1,32 +0,0 @@
From 61eb9c240004d1dbd0b5973e2fecda3686bb4c53 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 10 Aug 2021 09:06:55 +0200
Subject: [PATCH] Build: rpm: package fence_watchdog in base-package
---
rpm/pacemaker.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in
index f58357a..0c569b9 100644
--- a/rpm/pacemaker.spec.in
+++ b/rpm/pacemaker.spec.in
@@ -734,6 +734,7 @@ exit 0
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/fence_legacy
+%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.*
@@ -797,7 +798,6 @@ exit 0
%{_sbindir}/crm_simulate
%{_sbindir}/crm_report
%{_sbindir}/crm_ticket
-%{_sbindir}/fence_watchdog
%{_sbindir}/stonith_admin
# "dirname" is owned by -schemas, which is a prerequisite
%{_datadir}/pacemaker/report.collector
--
1.8.3.1

View File

@ -1,25 +0,0 @@
From 46dd1118cae948649e000b2159e8e92623520ad9 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Thu, 19 Aug 2021 09:28:54 +0200
Subject: [PATCH] Fix: fence_watchdog: fix malformed xml in metadata
---
daemons/fenced/fence_watchdog.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/fenced/fence_watchdog.in b/daemons/fenced/fence_watchdog.in
index 700065e..eefa739 100755
--- a/daemons/fenced/fence_watchdog.in
+++ b/daemons/fenced/fence_watchdog.in
@@ -124,7 +124,7 @@ def metadata(avail_opt, options):
for option, dummy in sorted_options(avail_opt):
if "shortdesc" in ALL_OPT[option]:
print(' <parameter name="' + option +
- 'required="' + ALL_OPT[option]["required"] + '">')
+ '" required="' + ALL_OPT[option]["required"] + '">')
default = ""
default_name_arg = "-" + ALL_OPT[option]["getopt"][:-1]
--
1.8.3.1

View File

@ -1,38 +0,0 @@
From 18b4c8170efaa4e17fcbfcd2873722de45fb9d25 Mon Sep 17 00:00:00 2001
From: Grace Chin <gchin@redhat.com>
Date: Wed, 18 Aug 2021 09:42:57 -0400
Subject: [PATCH] Test: cts-fencing: Add a test for --metadata
---
cts/cts-fencing.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in
index 8dc5ec8..c4697ee 100644
--- a/cts/cts-fencing.in
+++ b/cts/cts-fencing.in
@@ -1423,6 +1423,13 @@ class Tests(object):
test.add_stonith_log_pattern("perform 'reboot' action targeting node_fake using true2")
test.add_stonith_neg_log_pattern("node_fake with true3")
+ def build_query_tests(self):
+ """ run stonith_admin --metadata for the fence_dummy agent and check command output """
+
+ test = self.new_test("get_metadata",
+ "Run stonith_admin --metadata for the fence_dummy agent", 1)
+ test.add_cmd_check_stdout("stonith_admin", "--output-as=xml -a fence_dummy --metadata", '<shortdesc lang')
+
def setup_environment(self, use_corosync):
""" Prepare the host before executing any tests """
@@ -1551,6 +1558,7 @@ def main(argv):
tests.build_unfence_on_target_tests()
tests.build_nodeid_tests()
tests.build_remap_tests()
+ tests.build_query_tests()
if opts.options['list-tests']:
tests.print_list()
--
1.8.3.1

View File

@ -1,45 +0,0 @@
From 2f3d1e1f960e89481cc4088832b8f76a5fc6d376 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Thu, 19 Aug 2021 17:02:16 +0200
Subject: [PATCH] Test: cts-fencing: check metadata from fence_dummy/watchdog
xml gotten via stonith_admin has actual metadata just embedded
and thus is always valid xml even if metadata itself isn't.
---
cts/cts-fencing.in | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in
index 942e607..0bedd9a 100644
--- a/cts/cts-fencing.in
+++ b/cts/cts-fencing.in
@@ -1442,6 +1442,18 @@ class Tests(object):
"Run stonith_admin --metadata for the fence_dummy agent", 1)
test.add_cmd_check_stdout("stonith_admin", "--output-as=xml -a fence_dummy --metadata", '<shortdesc lang')
+ def build_metadata_tests(self):
+ """ run fence-agents coming with pacemaker with -o metadata and check for valid xml """
+
+ test = self.new_test("check_metadata_dummy",
+ "Run fence_dummy -o metadata and check for valid xml", 0)
+ test.add_cmd("fence_dummy", "-o metadata", check_rng=False, check_stderr=False)
+ # fence_dummy prints on stderr to check that tools just listen on stdout
+
+ test = self.new_test("check_metadata_watchdog",
+ "Run fence_watchdog -o metadata and check for valid xml", 0)
+ test.add_cmd("fence_watchdog", "-o metadata", check_rng=False)
+
def setup_environment(self, use_corosync):
""" Prepare the host before executing any tests """
@@ -1571,6 +1583,7 @@ def main(argv):
tests.build_nodeid_tests()
tests.build_remap_tests()
tests.build_query_tests()
+ tests.build_metadata_tests()
if opts.options['list-tests']:
tests.print_list()
--
1.8.3.1

View File

@ -1,121 +0,0 @@
From 4ff5788e564bc5e76f87d0ab6b00501d57f68fad Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Thu, 19 Aug 2021 16:51:49 +0200
Subject: [PATCH] Test: cts-fencing: add a few options for tests
allow pure xml validity-check without checking against rng-file
allow discarding stdout for checks
add exception-handler for xmllint errors
---
cts/cts-fencing.in | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in
index c4697ee..942e607 100644
--- a/cts/cts-fencing.in
+++ b/cts/cts-fencing.in
@@ -109,7 +109,10 @@ def update_path():
def find_validator(rng_file):
if os.access("/usr/bin/xmllint", os.X_OK):
- return ["xmllint", "--relaxng", rng_file, "-"]
+ if rng_file == None:
+ return ["xmllint", "-"]
+ else:
+ return ["xmllint", "--relaxng", rng_file, "-"]
else:
return None
@@ -123,7 +126,7 @@ def rng_directory():
return SCHEMA_DIR
-def pipe_communicate(pipes, stderr=False, stdin=None):
+def pipe_communicate(pipes, check_stderr=False, stdin=None):
""" Get text output from pipes """
if stdin is not None:
@@ -132,7 +135,7 @@ def pipe_communicate(pipes, stderr=False, stdin=None):
pipe_outputs = pipes.communicate()
output = pipe_outputs[0].decode(sys.stdout.encoding)
- if stderr:
+ if check_stderr:
output = output + pipe_outputs[1].decode(sys.stderr.encoding)
return output
@@ -240,7 +243,7 @@ class Test(object):
self.executed = 0
- def __new_cmd(self, cmd, args, exitcode, stdout_match="", no_wait=0, stdout_negative_match="", kill=None, validate=True):
+ def __new_cmd(self, cmd, args, exitcode, stdout_match="", no_wait=0, stdout_negative_match="", kill=None, validate=True, check_rng=True, check_stderr=True):
""" Add a command to be executed as part of this test """
self.cmds.append(
@@ -253,6 +256,8 @@ class Test(object):
"stdout_negative_match" : stdout_negative_match,
"no_wait" : no_wait,
"validate" : validate,
+ "check_rng" : check_rng,
+ "check_stderr" : check_stderr,
}
)
@@ -347,10 +352,10 @@ class Test(object):
self.negative_stonith_patterns.append(pattern)
- def add_cmd(self, cmd, args, validate=True):
+ def add_cmd(self, cmd, args, validate=True, check_rng=True, check_stderr=True):
""" Add a simple command to be executed as part of this test """
- self.__new_cmd(cmd, args, CrmExit.OK, "", validate=validate)
+ self.__new_cmd(cmd, args, CrmExit.OK, "", validate=validate, check_rng=check_rng, check_stderr=check_stderr)
def add_cmd_no_wait(self, cmd, args):
""" Add a simple command to be executed (without waiting) as part of this test """
@@ -397,7 +402,7 @@ class Test(object):
else:
return CrmExit.OK
- output = pipe_communicate(test, stderr=True)
+ output = pipe_communicate(test, check_stderr=args['check_stderr'])
if self.verbose:
print(output)
@@ -413,7 +418,10 @@ class Test(object):
raise OutputFoundError(output)
if args['validate']:
- rng_file = rng_directory() + "/api/api-result.rng"
+ if args['check_rng']:
+ rng_file = rng_directory() + "/api/api-result.rng"
+ else:
+ rng_file = None
cmd = find_validator(rng_file)
if not cmd:
@@ -423,7 +431,7 @@ class Test(object):
print("\nRunning: "+" ".join(cmd))
validator = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output = pipe_communicate(validator, stderr=True, stdin=output)
+ output = pipe_communicate(validator, check_stderr=True, stdin=output)
if self.verbose:
print(output)
@@ -508,6 +516,10 @@ class Test(object):
print("Step %d FAILED - '%s' was found in command output: %s" % (i, cmd['stdout_negative_match'], e))
self.set_error(i, cmd);
break
+ except XmlValidationError as e:
+ print("Step %d FAILED - xmllint failed: %s" % (i, e))
+ self.set_error(i, cmd);
+ break
if self.verbose:
print("Step %d SUCCESS" % (i))
i = i + 1
--
1.8.3.1

View File

@ -31,11 +31,11 @@
## Upstream pacemaker version, and its package version (specversion
## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.1
%global specversion 9
%global pcmkversion 2.1.2
%global specversion 0.1.rc1
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit 77db57872790c73e44ee7f49005d3ee1dded652e
%global commit 62c36e2b1ebe3dd0e970dabab6a44f9fc50bdfa2
## Since git v2.11, the extent of abbreviation is autoscaled by default
## (used to be constant of 7), so we need to convey it for non-tags, too.
@ -215,14 +215,6 @@ Url: https://www.clusterlabs.org/
# You can use "spectool -s 0 pacemaker.spec" (rpmdevtools) to show final URL.
Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{archive_github_url}
Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url}
Patch0: 0001-feature-watchdog-fencing-allow-restriction-to-certai.patch
Patch1: 0002-Fix-watchdog-fencing-Silence-warning-without-node-re.patch
Patch2: 0003-Fix-fence_watchdog-fix-version-output-needed-for-hel.patch
Patch3: 0004-Build-rpm-package-fence_watchdog-in-base-package.patch
Patch6: 0005-Fix-fence_watchdog-fix-malformed-xml-in-metadata.patch
Patch7: 0006-Test-cts-fencing-Add-a-test-for-metadata.patch
Patch8: 0007-Test-cts-fencing-check-metadata-from-fence_dummy-wat.patch
Patch9: 0008-Test-cts-fencing-add-a-few-options-for-tests.patch
# upstream commits
@ -277,6 +269,9 @@ BuildRequires: help2man
BuildRequires: ncurses-devel
BuildRequires: pam-devel
# Required for "make check"
BuildRequires: libcmocka-devel
BuildRequires: pkgconfig(systemd)
# RH patches are created by git, so we need git to apply them
@ -301,7 +296,7 @@ Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release}
# Bundled bits
## Pacemaker uses the crypto/md5-buffer module from gnulib
%if 0%{?fedora} || 0%{?rhel}
Provides: bundled(gnulib)
Provides: bundled(gnulib) = 20200404
%endif
%description
@ -559,10 +554,6 @@ rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.*
rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent
rm -f %{buildroot}/%{_sbindir}/ipmiservicelogd
# Don't ship init scripts for systemd based platforms
rm -f %{buildroot}/%{_initrddir}/pacemaker
rm -f %{buildroot}/%{_initrddir}/pacemaker_remote
# Byte-compile Python sources where suitable and the distro procedures known
%if %{defined py_byte_compile}
%{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests}
@ -743,7 +734,6 @@ exit 0
%doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_legacy.*
%exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.*
@ -833,6 +823,11 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Mon Nov 8 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.2-0.1.rc1
- Update for new upstream tarball for release candidate: Pacemaker-2.1.2-rc1,
for full details, see included ChangeLog file or
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.2-rc1
* Wed Sep 15 2021 Klaus Wenninger <kwenning@redhat.com> - 2.1.1-9
- allow xml-testing without rng in cts-fencing
- merged in upstream spec-changes

View File

@ -1,2 +1,2 @@
SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad
SHA512 (pacemaker-77db57872.tar.gz) = 37fc0eafd8d3a0342e42b5a3a8eb2b32c24324a859adeed86c997884f667bf8e8bb2d231891c5be3268e78c0d950e9127e7a209fbec6a212c54420fab0c247a2
SHA512 (pacemaker-62c36e2b1.tar.gz) = 0cffa538a31ed6c74215c8d3dafa7c67df4efc611579e3d09b49c1eba54fd0c4665603eb77b74bea861e2e163830d309683c6d3e320ac29ce0c6707545116950