import pcs-0.10.12-3.el8

This commit is contained in:
CentOS Sources 2022-01-19 21:23:15 +00:00 committed by Stepan Oksanichenko
parent dbad5a043a
commit 61793c1985
8 changed files with 1277 additions and 9 deletions

4
.gitignore vendored
View File

@ -10,8 +10,8 @@ SOURCES/json-2.3.0.gem
SOURCES/mustermann-1.1.1.gem
SOURCES/open4-1.3.4-1.gem
SOURCES/pcs-0.10.12.tar.gz
SOURCES/pcs-web-ui-0.1.11.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.11.tar.xz
SOURCES/pcs-web-ui-0.1.12.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
SOURCES/pyagentx-0.4.pcs.2.tar.gz
SOURCES/python-dateutil-2.8.1.tar.gz
SOURCES/rack-2.2.3.gem

View File

@ -10,8 +10,8 @@ cfa25e7a3760c3ec16723cb8263d9b7a52d0eadf SOURCES/ffi-1.13.1.gem
50a4e37904485810cb05e27d75c9783e5a8f3402 SOURCES/mustermann-1.1.1.gem
41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem
1937b826a36bb8396da227361d13f4c25830929c SOURCES/pcs-0.10.12.tar.gz
84f87804814a2f97aa9b9a33ca47f43fd6198097 SOURCES/pcs-web-ui-0.1.11.tar.gz
769c4b1abe37b44673e92c90c29d32fe9240fbc1 SOURCES/pcs-web-ui-node-modules-0.1.11.tar.xz
a29bfd22130ac978c5d4a6a82108ce37ad2a5db9 SOURCES/pcs-web-ui-0.1.12.tar.gz
c9723466d7bfb353899307a5700177f47e7e6cff SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz
bd26127e57f83a10f656b62c46524c15aeb844dd SOURCES/python-dateutil-2.8.1.tar.gz
345b7169d4d2d62176a225510399963bad62b68f SOURCES/rack-2.2.3.gem

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
From f0342f110bdb4a7421532b85ca0f49070c7e5c1e Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 13 Jan 2022 17:32:38 +0100
Subject: [PATCH 4/5] fix creating empty cib
---
pcs/utils.py | 21 +++++++++++----------
pcs_test/tier1/test_misc.py | 25 ++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/pcs/utils.py b/pcs/utils.py
index ad2d4452..423ffc43 100644
--- a/pcs/utils.py
+++ b/pcs/utils.py
@@ -2067,16 +2067,17 @@ def write_empty_cib(cibfile):
"""
Commandline options: no options
"""
- empty_xml = """<?xml version="1.0" encoding="UTF-8"?>
-<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2">
- <configuration>
- <crm_config/>
- <nodes/>
- <resources/>
- <constraints/>
- </configuration>
- <status/>
-</cib>"""
+ empty_xml = """
+ <cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-3.1">
+ <configuration>
+ <crm_config/>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ </configuration>
+ <status/>
+ </cib>
+ """
with open(cibfile, "w") as f:
f.write(empty_xml)
diff --git a/pcs_test/tier1/test_misc.py b/pcs_test/tier1/test_misc.py
index 29ca6a71..6e6f72fb 100644
--- a/pcs_test/tier1/test_misc.py
+++ b/pcs_test/tier1/test_misc.py
@@ -1,8 +1,10 @@
+import os
from unittest import TestCase
from pcs_test.tools.assertions import AssertPcsMixin
from pcs_test.tools.misc import (
get_test_resource as rc,
+ get_tmp_dir,
get_tmp_file,
outdent,
write_file_to_tmpfile,
@@ -19,7 +21,7 @@ class ParseArgvDashDash(TestCase, AssertPcsMixin):
cmd = "constraint colocation add R1 with R2".split()
def setUp(self):
- self.temp_cib = get_tmp_file("tier1_misc")
+ self.temp_cib = get_tmp_file("tier1_misc_dashdash")
write_file_to_tmpfile(rc("cib-empty.xml"), self.temp_cib)
self.pcs_runner = PcsRunner(self.temp_cib.name)
self.allowed_roles = format_list(const.PCMK_ROLES)
@@ -89,3 +91,24 @@ class ParseArgvDashDash(TestCase, AssertPcsMixin):
"""
),
)
+
+
+class EmptyCibIsPcmk2Compatible(TestCase, AssertPcsMixin):
+ # This test verifies that a default empty CIB created by pcs when -f points
+ # to an empty file conforms to minimal schema version supported by
+ # pacemaker 2.0. If pcs prints a message that CIB schema has been upgraded,
+ # then the test fails and shows there is a bug. Bundle with promoted-max
+ # requires CIB compliant with schema 3.1, which was introduced in pacemaker
+ # 2.0.0.
+ def setUp(self):
+ self.cib_dir = get_tmp_dir("tier1_misc_empty_cib")
+ self.pcs_runner = PcsRunner(os.path.join(self.cib_dir.name, "cib.xml"))
+
+ def tearDown(self):
+ self.cib_dir.cleanup()
+
+ def test_success(self):
+ self.assert_pcs_success(
+ "resource bundle create b container docker image=my.img promoted-max=1".split(),
+ "",
+ )
--
2.31.1

View File

@ -0,0 +1,86 @@
From 082bded126151e4f4b4667a1d8337db741828da6 Mon Sep 17 00:00:00 2001
From: Miroslav Lisik <mlisik@redhat.com>
Date: Thu, 16 Dec 2021 14:12:58 +0100
Subject: [PATCH 1/5] skip checking of scsi devices to be removed before
unfencing to be added devices
---
pcs/lib/commands/scsi.py | 3 ++-
pcs_test/tier0/lib/commands/test_scsi.py | 21 +++++++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pcs/lib/commands/scsi.py b/pcs/lib/commands/scsi.py
index ff20a563..ab732805 100644
--- a/pcs/lib/commands/scsi.py
+++ b/pcs/lib/commands/scsi.py
@@ -31,7 +31,8 @@ def unfence_node(
return
fence_scsi_bin = os.path.join(settings.fence_agent_binaries, "fence_scsi")
fenced_devices = []
- for device in original_devices:
+ # do not check devices being removed
+ for device in sorted(set(original_devices) & set(updated_devices)):
stdout, stderr, return_code = env.cmd_runner().run(
[
fence_scsi_bin,
diff --git a/pcs_test/tier0/lib/commands/test_scsi.py b/pcs_test/tier0/lib/commands/test_scsi.py
index 8ef9836a..bc2357a9 100644
--- a/pcs_test/tier0/lib/commands/test_scsi.py
+++ b/pcs_test/tier0/lib/commands/test_scsi.py
@@ -13,10 +13,13 @@ class TestUnfenceNode(TestCase):
self.old_devices = ["device1", "device3"]
self.new_devices = ["device3", "device0", "device2"]
self.added_devices = set(self.new_devices) - set(self.old_devices)
+ self.check_devices = sorted(
+ set(self.old_devices) & set(self.new_devices)
+ )
self.node = "node1"
def test_success_devices_to_unfence(self):
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node, old_dev, name=f"runner.scsi.is_fenced.{old_dev}"
)
@@ -38,9 +41,19 @@ class TestUnfenceNode(TestCase):
)
self.env_assist.assert_reports([])
+ def test_success_replace_unavailable_device(self):
+ self.config.runner.scsi.unfence_node(self.node, {"device2"})
+ scsi.unfence_node(
+ self.env_assist.get_env(),
+ self.node,
+ {"device1"},
+ {"device2"},
+ )
+ self.env_assist.assert_reports([])
+
def test_unfencing_failure(self):
err_msg = "stderr"
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node, old_dev, name=f"runner.scsi.is_fenced.{old_dev}"
)
@@ -98,7 +111,7 @@ class TestUnfenceNode(TestCase):
def test_unfencing_skipped_devices_are_fenced(self):
stdout_off = "Status: OFF"
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node,
old_dev,
@@ -116,7 +129,7 @@ class TestUnfenceNode(TestCase):
[
fixture.info(
report_codes.STONITH_UNFENCING_SKIPPED_DEVICES_FENCED,
- devices=sorted(self.old_devices),
+ devices=sorted(self.check_devices),
)
]
)
--
2.31.1

View File

@ -0,0 +1,41 @@
From 46b079a93d1817f9c1d6a7403c70b30f59d19c20 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Tue, 4 Jan 2022 12:56:56 +0100
Subject: [PATCH 2/5] Make ocf:linbit:drbd agent pass OCF validation
---
data/ocf-1.0.rng | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/data/ocf-1.0.rng b/data/ocf-1.0.rng
index 36ba4611..1e14a83b 100644
--- a/data/ocf-1.0.rng
+++ b/data/ocf-1.0.rng
@@ -169,16 +169,14 @@ RNGs. Thank you.
<optional>
<element name="content">
<choice>
- <attribute name="type">
- <choice>
- <value>boolean</value>
- <value>string</value>
- <value>integer</value>
- <value>second</value><!-- used by fence agents -->
- <value>int</value><!-- used by fence agents intead of integer -->
- <value>time</value><!-- used by pacemaker metadata -->
- </choice>
- </attribute>
+ <!--
+ OCF 1.0 allows values: boolean, integer, string. Agents, however,
+ quite often use other values: int (fence agents), numeric
+ (ocf:linbit:drbd), second (fence agents), time (pacemaker
+ metadata). Since pcs doesn't actually care about the type, we
+ allow any type to keep compatibility with existing agents.
+ -->
+ <attribute name="type" />
<group>
<!--
used by fence agents and processed by pcs even though it is not
--
2.31.1

View File

@ -1,7 +1,7 @@
From df65f70b8b55de5a7d4b961ad3ffd34d35e5311e Mon Sep 17 00:00:00 2001
From a917cf5ad7883103987b8e939bd2d899c5ba6c35 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH 3/3] do not support cluster setup with udp(u) transport
Subject: [PATCH 5/5] do not support cluster setup with udp(u) transport
---
pcs/pcs.8.in | 2 ++

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.10.12
Release: 2%{?dist}
Release: 3%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
@ -25,8 +25,8 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.11
%global ui_modules_version 0.1.11
%global ui_commit 0.1.12
%global ui_modules_version 0.1.12
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pcs_snmp_pkg_name pcs-snmp
@ -120,6 +120,10 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_modu
# Patch1: bzNUMBER-01-name.patch
Patch1: bz2028902-01-fix-enabling-corosync-qdevice.patch
Patch2: bz1384485-01-fix-rsc-update-cmd-when-unable-to-get-agent-metadata.patch
Patch3: bz2032997-01-skip-checking-of-scsi-devices-to-be-removed.patch
Patch4: bz2036633-01-Make-ocf-linbit-drbd-agent-pass-OCF-validation.patch
Patch5: bz1990784-01-Multiple-fixes-of-pcs-resource-move-autodelete-comma.patch
Patch6: bz2022463-01-fix-creating-empty-cib.patch
# Downstream patches do not come from upstream. They adapt pcs for specific
# RHEL needs.
@ -320,6 +324,10 @@ update_times_patch(){
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
update_times_patch %{PATCH4}
update_times_patch %{PATCH5}
update_times_patch %{PATCH6}
update_times_patch %{PATCH101}
cp -f %SOURCE1 %{pcsd_public_dir}/images
@ -569,6 +577,14 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Fri Jan 14 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.12-3
- Fixed 'pcs resource move --autodelete' command
- Fixed removing of unavailable fence-scsi storage device
- Fixed ocf validation of ocf linbit drdb agent
- Fixed creating empty cib
- Updated pcs-web-ui
- Resolves: rhbz#1990784 rhbz#2022463 rhbz#2032997 rhbz#2036633
* Wed Dec 15 2021 Miroslav Lisik <mlisik@redhat.com> - 0.10.12-2
- Fixed rsc update cmd when unable to get agent metadata
- Fixed enabling corosync-qdevice