Resolves: rhbz#1990787 rhbz#2033248 rhbz#2039883 rhbz#2040420
- Fixed 'pcs resource move' 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
This commit is contained in:
parent
fdf68af2f8
commit
a4dcfd9e5c
2
.gitignore
vendored
2
.gitignore
vendored
@ -151,3 +151,5 @@
|
||||
/pcs-web-ui-0.1.11.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.11.tar.xz
|
||||
/pcs-0.11.1.tar.gz
|
||||
/pcs-web-ui-0.1.12.tar.gz
|
||||
/pcs-web-ui-node-modules-0.1.12.tar.xz
|
||||
|
41
Make-ocf-linbit-drbd-agent-pass-OCF-validation.patch
Normal file
41
Make-ocf-linbit-drbd-agent-pass-OCF-validation.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From e58f7897d561cff2f9c257933acdb36d57cc130c 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/4] 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
|
||||
|
1056
bz1990787-01-Multiple-fixes-in-pcs-resource-move-command.patch
Normal file
1056
bz1990787-01-Multiple-fixes-in-pcs-resource-move-command.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,86 @@
|
||||
From 1f91f67a18885937794e775bbbcde973ffe59468 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/4] 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
|
||||
|
94
bz2040420-01-fix-creating-empty-cib.patch
Normal file
94
bz2040420-01-fix-creating-empty-cib.patch
Normal file
@ -0,0 +1,94 @@
|
||||
From 94d411afc37de231c8a3101c30e1e6ba66ecd223 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/4] 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 2f5949a7..b5b8af05 100644
|
||||
--- a/pcs/utils.py
|
||||
+++ b/pcs/utils.py
|
||||
@@ -2135,16 +2135,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 13312a69..abd02c61 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
|
||||
|
22
pcs.spec
22
pcs.spec
@ -1,6 +1,6 @@
|
||||
Name: pcs
|
||||
Version: 0.11.1
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||
# GPLv2: pcs
|
||||
@ -24,8 +24,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
|
||||
@ -109,6 +109,10 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_comm
|
||||
Patch2: bz2032473-01-fix-enabling-corosync-qdevice.patch
|
||||
Patch3: bz2019836-01-fix-rsc-update-cmd-when-unable-to-get-agent-metadata.patch
|
||||
Patch4: bz1811072-01-revert-of-disallowing-to-clone-a-group-with-a-stonit.patch
|
||||
Patch5: bz2033248-01-skip-checking-of-scsi-devices-to-be-removed.patch
|
||||
Patch6: Make-ocf-linbit-drbd-agent-pass-OCF-validation.patch
|
||||
Patch7: bz1990787-01-Multiple-fixes-in-pcs-resource-move-command.patch
|
||||
Patch8: bz2040420-01-fix-creating-empty-cib.patch
|
||||
|
||||
# Downstream patches do not come from upstream. They adapt pcs for specific
|
||||
# RHEL needs.
|
||||
@ -301,6 +305,10 @@ 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 %{PATCH7}
|
||||
update_times_patch %{PATCH8}
|
||||
|
||||
# prepare dirs/files necessary for building all bundles
|
||||
# -----------------------------------------------------
|
||||
@ -541,6 +549,14 @@ run_all_tests
|
||||
%license pyagentx_LICENSE.txt
|
||||
|
||||
%changelog
|
||||
* Fri Jan 14 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-8
|
||||
- Fixed 'pcs resource move' 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#1990787 rhbz#2033248 rhbz#2039883 rhbz#2040420
|
||||
|
||||
* Wed Dec 15 2021 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-7
|
||||
- Fixed enabling corosync-qdevice
|
||||
- Fixed resource update command when unable to get agent metadata
|
||||
|
4
sources
4
sources
@ -17,6 +17,6 @@ SHA512 (tornado-6.1.0.tar.gz) = bd161a1c30f40f983d608297bca113735cb4baad255de713
|
||||
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
|
||||
SHA512 (webrick-1.7.0.gem) = 5f242b50300046fe7c22ecd1640a73e5815e05a72bedfebe6bc39c24c92bd61abdd180860de0d194c0eebbc640b507b6892de181d3b577c5372ace0ca6faf2a3
|
||||
SHA512 (rexml-3.2.5.gem) = 1e3838d4a5befa76137fb8fea6a20195490645aa2b1c5d14d1eeca6c093d7f64eb405f07fd07b00fcafa9606dc78f9f0a488012338f81414623feb6e8cb83931
|
||||
SHA512 (pcs-web-ui-node-modules-0.1.11.tar.xz) = 9d11d3549480a92f839b93427544f2aadc115ba4f9a0f0c672cc0d54a7a5813ced43e34dc81dfed4f77ded25664a3cccc4a85f33b3454c85d4369c8f98e71c9e
|
||||
SHA512 (pcs-0.11.1.tar.gz) = 24fdcf027965c99534d1cd411d5517a1446f633d80a1ccb9dc6be95adda8a81f0ef74df94bb433296b3e9a90b8b96ab318c75473efdc53fe48446fd0d9c9f3da
|
||||
SHA512 (pcs-web-ui-0.1.11.tar.gz) = f668bf29a8c4d5714e3d560779221672289d5bdfc6a1f68d124ec511c38053eab4526df258d29c25243413280ab1189709270a5ee51d9d3c42f556d3b5648d72
|
||||
SHA512 (pcs-web-ui-0.1.12.tar.gz) = 0c1e3e71ce4cf5a1a39319b379985267642ed36d54bc18c6b0c4c5c9f8cd24e59c4f6137a64ffe704fe22a056960c3a205308dba17060680f3bbd92abe9ab9f4
|
||||
SHA512 (pcs-web-ui-node-modules-0.1.12.tar.xz) = 4f72f5f239613ab93ce1f32126050fae1b1c00ec3b73799a1ace3687c1a35370168ff1b6e070c2b661ece84e3ed4463189453247a2799f20dac1028b0c9b83f6
|
||||
|
Loading…
Reference in New Issue
Block a user