import pcs-0.11.3-4.el9

This commit is contained in:
CentOS Sources 2022-11-15 01:25:52 -05:00 committed by Stepan Oksanichenko
parent 7c19236ac6
commit 3ab104fd63
20 changed files with 2761 additions and 1630 deletions

21
.gitignore vendored
View File

@ -1,22 +1,21 @@
SOURCES/backports-3.17.2.gem
SOURCES/backports-3.23.0.gem
SOURCES/dacite-1.6.0.tar.gz
SOURCES/daemons-1.3.1.gem
SOURCES/ethon-0.12.0.gem
SOURCES/daemons-1.4.1.gem
SOURCES/ethon-0.15.0.gem
SOURCES/eventmachine-1.2.7.gem
SOURCES/ffi-1.13.1.gem
SOURCES/ffi-1.15.5.gem
SOURCES/mustermann-1.1.1.gem
SOURCES/open4-1.3.4-1.gem
SOURCES/pcs-0.11.1.tar.gz
SOURCES/pcs-web-ui-0.1.12.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
SOURCES/pcs-0.11.3.tar.gz
SOURCES/pcs-web-ui-0.1.14.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.14.tar.xz
SOURCES/pyagentx-0.4.pcs.2.tar.gz
SOURCES/rack-2.2.3.gem
SOURCES/rack-2.2.3.1.gem
SOURCES/rack-protection-2.2.0.gem
SOURCES/rack-test-1.1.0.gem
SOURCES/rexml-3.2.5.gem
SOURCES/ruby2_keywords-0.0.2.gem
SOURCES/ruby2_keywords-0.0.5.gem
SOURCES/sinatra-2.2.0.gem
SOURCES/thin-1.7.2.gem
SOURCES/thin-1.8.1.gem
SOURCES/tilt-2.0.10.gem
SOURCES/tornado-6.1.0.tar.gz
SOURCES/webrick-1.7.0.gem

View File

@ -1,22 +1,21 @@
28b63a742124da6c9575a1c5e7d7331ef93600b2 SOURCES/backports-3.17.2.gem
0e11246385a9e0a4bc122b74fb74fe536a234f81 SOURCES/backports-3.23.0.gem
31546c37fbdc6270d5097687619e9c0db6f1c05c SOURCES/dacite-1.6.0.tar.gz
e28c1e78d1a6e34e80f4933b494f1e0501939dd3 SOURCES/daemons-1.3.1.gem
921ef1be44583a7644ee7f20fe5f26f21d018a04 SOURCES/ethon-0.12.0.gem
4795a8962cc1608bfec0d91fa4d438c7cfe90c62 SOURCES/daemons-1.4.1.gem
29697a34b8cd9df4a77c650e2a38d0a36cdeee8b SOURCES/ethon-0.15.0.gem
7a5b2896e210fac9759c786ee4510f265f75b481 SOURCES/eventmachine-1.2.7.gem
cfa25e7a3760c3ec16723cb8263d9b7a52d0eadf SOURCES/ffi-1.13.1.gem
97632b7975067266c0b39596de0a4c86d9330658 SOURCES/ffi-1.15.5.gem
50a4e37904485810cb05e27d75c9783e5a8f3402 SOURCES/mustermann-1.1.1.gem
41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem
47d8d30bf502ff2a6a81c6cebc262fc272b48011 SOURCES/pcs-0.11.1.tar.gz
a29bfd22130ac978c5d4a6a82108ce37ad2a5db9 SOURCES/pcs-web-ui-0.1.12.tar.gz
c9723466d7bfb353899307a5700177f47e7e6cff SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
c16c4623928ba85b0b94b8cbdec6396be85d3672 SOURCES/pcs-0.11.3.tar.gz
4f518dcca24972f19d3e377931595602106f049d SOURCES/pcs-web-ui-0.1.14.tar.gz
b3e77ed1e3bb07b8e0ed34ae80fc88b9be0f49a4 SOURCES/pcs-web-ui-node-modules-0.1.14.tar.xz
3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz
345b7169d4d2d62176a225510399963bad62b68f SOURCES/rack-2.2.3.gem
be609467c819d263c138c417548431b81f8da216 SOURCES/rack-2.2.3.1.gem
21cfac2453436c6856da31e741bbfa59da4973e1 SOURCES/rack-protection-2.2.0.gem
b80bc5ca38a885e747271675ba91dd3d02136bf1 SOURCES/rack-test-1.1.0.gem
e7f48fa5fb2d92e6cb21d6b1638fe41a5a7c4287 SOURCES/rexml-3.2.5.gem
0be571aacb5d6a212a30af3f322a7000d8af1ef9 SOURCES/ruby2_keywords-0.0.2.gem
d017b9e4d1978e0b3ccc3e2a31493809e4693cd3 SOURCES/ruby2_keywords-0.0.5.gem
5f0d7e63f9d8683f39ad23afe7e00b99602b87cc SOURCES/sinatra-2.2.0.gem
41395e86322ffd31f3a7aef1f697bda3e1e2d6b9 SOURCES/thin-1.7.2.gem
1ac6292a98e17247b7bb847a35ff868605256f7b SOURCES/thin-1.8.1.gem
d265c822a6b228392d899e9eb5114613d65e6967 SOURCES/tilt-2.0.10.gem
c23c617c7a0205e465bebad5b8cdf289ae8402a2 SOURCES/tornado-6.1.0.tar.gz
10ba51035928541b7713415f1f2e3a41114972fc SOURCES/webrick-1.7.0.gem

View File

@ -1,41 +0,0 @@
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

View File

@ -1,84 +0,0 @@
From e1573865543a3d59930b315a40ecd9b7a807e1c1 Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Mon, 13 Dec 2021 12:48:26 +0100
Subject: [PATCH 3/3] revert of disallowing to clone a group with a stonith
inside
Originally, this was not fixed properly (it was possible to add a stonith
into a cloned group), therefore to stay consistent, this change is being
reverted. It will be fixed in the future by not allowing stonith to be
placed into a group.
---
pcs/resource.py | 16 ++--------------
.../tier1/cib_resource/test_clone_unclone.py | 8 ++------
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/pcs/resource.py b/pcs/resource.py
index 928477b2..c7cf4c7e 100644
--- a/pcs/resource.py
+++ b/pcs/resource.py
@@ -1697,7 +1697,7 @@ def resource_clone_create(
):
element.parentNode.parentNode.removeChild(element.parentNode)
- def _reject_stonith_clone_report(force_flags, stonith_ids, group_id=None):
+ if element.getAttribute("class") == "stonith":
process_library_reports(
[
reports.ReportItem(
@@ -1706,24 +1706,12 @@ def resource_clone_create(
is_forced=reports.codes.FORCE in force_flags,
),
message=reports.messages.CloningStonithResourcesHasNoEffect(
- stonith_ids, group_id=group_id
+ [name]
),
)
]
)
- if element.getAttribute("class") == "stonith":
- _reject_stonith_clone_report(force_flags, [name])
-
- if element.tagName == "group":
- stonith_ids = [
- resource.getAttribute("id")
- for resource in element.getElementsByTagName("primitive")
- if resource.getAttribute("class") == "stonith"
- ]
- if stonith_ids:
- _reject_stonith_clone_report(force_flags, stonith_ids, name)
-
parts = parse_clone_args(argv, promotable=promotable)
if not update_existing:
clone_id = parts["clone_id"]
diff --git a/pcs_test/tier1/cib_resource/test_clone_unclone.py b/pcs_test/tier1/cib_resource/test_clone_unclone.py
index 7b0e89f9..4cc4cb3e 100644
--- a/pcs_test/tier1/cib_resource/test_clone_unclone.py
+++ b/pcs_test/tier1/cib_resource/test_clone_unclone.py
@@ -354,12 +354,9 @@ class Clone(
def test_clone_group_with_stonith(self):
self.set_cib_file(FIXTURE_GROUP_WITH_STONITH)
- self.assert_pcs_fail(
+ self.assert_effect(
"resource clone Group".split(),
- fixture_clone_stonith_msg(group=True),
- )
- self.assert_resources_xml_in_cib(
- fixture_resources_xml(FIXTURE_GROUP_WITH_STONITH)
+ fixture_resources_xml(FIXTURE_CLONED_GROUP_WITH_STONITH),
)
def test_clone_group_with_stonith_forced(self):
@@ -367,7 +364,6 @@ class Clone(
self.assert_effect(
"resource clone Group --force".split(),
fixture_resources_xml(FIXTURE_CLONED_GROUP_WITH_STONITH),
- output=fixture_clone_stonith_msg(forced=True, group=True),
)
def test_promotable_clone(self):
--
2.31.1

View File

@ -1,73 +0,0 @@
From 69bfb22dbd68023069f6dae11e418f6ad455474f Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Tue, 7 Dec 2021 11:14:37 +0100
Subject: [PATCH 2/3] fix rsc update cmd when unable to get agent metadata
`resource update` command failed with a traceback when updating a
resource with a non-existing resource agent
---
pcs/resource.py | 14 ++++++++------
pcs_test/tier1/legacy/test_resource.py | 21 +++++++++++++++++++++
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/pcs/resource.py b/pcs/resource.py
index b2a5e355..928477b2 100644
--- a/pcs/resource.py
+++ b/pcs/resource.py
@@ -1075,13 +1075,15 @@ def resource_update(lib, args, modifiers, deal_with_guest_change=True):
if report_list:
process_library_reports(report_list)
except lib_ra.ResourceAgentError as e:
- severity = (
- reports.ReportItemSeverity.WARNING
- if modifiers.get("--force")
- else reports.ReportItemSeverity.ERROR
- )
process_library_reports(
- [lib_ra.resource_agent_error_to_report_item(e, severity)]
+ [
+ lib_ra.resource_agent_error_to_report_item(
+ e,
+ reports.get_severity(
+ reports.codes.FORCE, modifiers.get("--force")
+ ),
+ )
+ ]
)
except LibraryError as e:
process_library_reports(e.args)
diff --git a/pcs_test/tier1/legacy/test_resource.py b/pcs_test/tier1/legacy/test_resource.py
index 417ca131..0f8415b4 100644
--- a/pcs_test/tier1/legacy/test_resource.py
+++ b/pcs_test/tier1/legacy/test_resource.py
@@ -4882,6 +4882,27 @@ class UpdateInstanceAttrs(
),
)
+ def test_nonexisting_agent(self):
+ agent = "ocf:pacemaker:nonexistent"
+ message = (
+ f"Agent '{agent}' is not installed or does "
+ "not provide valid metadata: Metadata query for "
+ f"{agent} failed: Input/output error"
+ )
+ self.assert_pcs_success(
+ f"resource create --force D0 {agent}".split(),
+ f"Warning: {message}\n",
+ )
+
+ self.assert_pcs_fail(
+ "resource update D0 test=testA".split(),
+ f"Error: {message}, use --force to override\n",
+ )
+ self.assert_pcs_success(
+ "resource update --force D0 test=testA".split(),
+ f"Warning: {message}\n",
+ )
+
def test_update_existing(self):
xml = """
<resources>
--
2.31.1

View File

@ -0,0 +1,46 @@
From f863c38497eb716141c9e585ddb418191e9fc2a4 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Fri, 15 Jul 2022 15:55:57 +0200
Subject: [PATCH 3/3] booth sync: check whether /etc/booth exists
---
pcsd/pcsd_file.rb | 6 +-----
pcsd/remote.rb | 4 ++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pcsd/pcsd_file.rb b/pcsd/pcsd_file.rb
index d82b55d2..394db59a 100644
--- a/pcsd/pcsd_file.rb
+++ b/pcsd/pcsd_file.rb
@@ -112,12 +112,8 @@ module PcsdFile
end
end
- def dir()
- return BOOTH_CONFIG_DIR
- end
-
def full_file_name()
- @full_file_name ||= File.join(self.dir, @file[:name])
+ @full_file_name ||= File.join(BOOTH_CONFIG_DIR, @file[:name])
end
end
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index 854674eb..144d25f3 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2090,6 +2090,10 @@ def booth_set_config(params, request, auth_user)
check_permissions(auth_user, Permissions::WRITE)
data = check_request_data_for_json(params, auth_user)
+ if not File.directory?(BOOTH_CONFIG_DIR)
+ raise "Configuration directory for booth '/etc/booth' is missing. Is booth installed?"
+ end
+
PcsdExchangeFormat::validate_item_map_is_Hash('files', data)
PcsdExchangeFormat::validate_item_is_Hash('file', :config, data[:config])
if data[:authfile]
--
2.35.3

View File

@ -1,25 +0,0 @@
From 798d054db1a20b7cd2f2aed2b35b9e51835dec55 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Mon, 6 Dec 2021 16:06:31 +0100
Subject: [PATCH 1/3] fix enabling corosync-qdevice
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index b569e249..e1923d6f 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2002,7 +2002,7 @@ def qdevice_client_enable(param, request, auth_user)
unless allowed_for_local_cluster(auth_user, Permissions::WRITE)
return 403, 'Permission denied'
end
- if not ServiceChecker.new('corosync', enabled: true).is_enabled?('corosync')
+ if not ServiceChecker.new(['corosync'], enabled: true).is_enabled?('corosync')
return pcsd_success('corosync is not enabled, skipping')
elsif enable_service('corosync-qdevice')
return pcsd_success('corosync-qdevice enabled')
--
2.31.1

View File

@ -1,86 +0,0 @@
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

View File

@ -1,94 +0,0 @@
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

View File

@ -1,23 +0,0 @@
From fa75f40361bc39cbd645b8014713e4c0ad0cda18 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Mon, 24 Jan 2022 14:08:54 +0100
Subject: [PATCH 2/2] fix backend parameter "all" in cluster destroy
---
src/app/backend/calls/destroyCluster.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/backend/calls/destroyCluster.ts b/src/app/backend/calls/destroyCluster.ts
index b6e83a41..cf41ea42 100644
--- a/src/app/backend/calls/destroyCluster.ts
+++ b/src/app/backend/calls/destroyCluster.ts
@@ -4,5 +4,5 @@ const { url } = endpoints.destroyCluster;
export const destroyCluster = (clusterName: string): CallResult =>
http.post(url({ clusterName }), {
- params: [["--all", "1"]],
+ params: [["all", "1"]],
});
--
2.31.1

View File

@ -1,25 +0,0 @@
From 7902bb8fe7f97fbbc93e7001a6c4e8a445dcb44e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Valentin=20Vidi=C4=87?= <vvidic@valentin-vidic.from.hr>
Date: Wed, 15 Dec 2021 20:32:26 +0100
Subject: [PATCH 1/2] Fix snmp client
Required constant is missing causing the command to fail on startup and breaking the pcs_snmp_agent service.
---
pcsd/pcsd-cli-main.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/pcsd/pcsd-cli-main.rb b/pcsd/pcsd-cli-main.rb
index 29b9006d..be72d543 100644
--- a/pcsd/pcsd-cli-main.rb
+++ b/pcsd/pcsd-cli-main.rb
@@ -10,6 +10,7 @@ require 'remote.rb'
PCS = get_pcs_path()
+PCS_INTERNAL = get_pcs_internal_path()
$logger_device = StringIO.new
$logger = Logger.new($logger_device)
early_log($logger)
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,126 @@
From de4845ea2d22c7dd9f4539360b44a900b1cea193 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 14 Jul 2022 16:46:33 +0200
Subject: [PATCH 2/3] make booth ticket mode value case insensitive
---
pcs/lib/booth/config_validators.py | 10 ++++++++
pcs/lib/commands/booth.py | 14 +++++++++---
pcs_test/tier0/lib/commands/test_booth.py | 28 ++++++++++++++++-------
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/pcs/lib/booth/config_validators.py b/pcs/lib/booth/config_validators.py
index 99badc46..6c4a4ddc 100644
--- a/pcs/lib/booth/config_validators.py
+++ b/pcs/lib/booth/config_validators.py
@@ -100,6 +100,16 @@ def remove_ticket(conf_facade, ticket_name):
return []
+def ticket_options_normalization() -> validate.TypeNormalizeFunc:
+ return validate.option_value_normalization(
+ {
+ "mode": (
+ lambda value: value.lower() if isinstance(value, str) else value
+ )
+ }
+ )
+
+
def validate_ticket_name(ticket_name: str) -> reports.ReportItemList:
if not __TICKET_NAME_RE.search(ticket_name):
return [
diff --git a/pcs/lib/commands/booth.py b/pcs/lib/commands/booth.py
index e7891fbe..fc1454ce 100644
--- a/pcs/lib/commands/booth.py
+++ b/pcs/lib/commands/booth.py
@@ -23,7 +23,10 @@ from pcs.common.reports.item import (
)
from pcs.common.services.errors import ManageServiceError
from pcs.common.str_tools import join_multilines
-from pcs.lib import tools
+from pcs.lib import (
+ tools,
+ validate,
+)
from pcs.lib.booth import (
config_files,
config_validators,
@@ -329,17 +332,22 @@ def config_ticket_add(
booth_env = env.get_booth_env(instance_name)
try:
booth_conf = booth_env.config.read_to_facade()
+ options_pairs = validate.values_to_pairs(
+ options, config_validators.ticket_options_normalization()
+ )
report_processor.report_list(
config_validators.add_ticket(
booth_conf,
ticket_name,
- options,
+ options_pairs,
allow_unknown_options=allow_unknown_options,
)
)
if report_processor.has_errors:
raise LibraryError()
- booth_conf.add_ticket(ticket_name, options)
+ booth_conf.add_ticket(
+ ticket_name, validate.pairs_to_values(options_pairs)
+ )
booth_env.config.write_facade(booth_conf, can_overwrite=True)
except RawFileError as e:
report_processor.report(raw_file_error_report(e))
diff --git a/pcs_test/tier0/lib/commands/test_booth.py b/pcs_test/tier0/lib/commands/test_booth.py
index 2b20a199..12b169c2 100644
--- a/pcs_test/tier0/lib/commands/test_booth.py
+++ b/pcs_test/tier0/lib/commands/test_booth.py
@@ -1194,7 +1194,7 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
},
)
- def test_success_ticket_options(self):
+ def assert_success_ticket_options(self, options_command, options_config):
self.config.raw_file.read(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
@@ -1203,17 +1203,29 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
self.config.raw_file.write(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
- self.fixture_cfg_content(
- ticket_list=[
- ["ticketA", [("retries", "10"), ("timeout", "20")]]
- ]
- ),
+ self.fixture_cfg_content(ticket_list=[["ticketA", options_config]]),
can_overwrite=True,
)
commands.config_ticket_add(
- self.env_assist.get_env(),
- "ticketA",
+ self.env_assist.get_env(), "ticketA", options_command
+ )
+
+ def test_success_ticket_options(self):
+ self.assert_success_ticket_options(
{"timeout": "20", "retries": "10"},
+ [("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "manual"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode_case_insensitive(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "MaNuAl"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
)
def test_ticket_already_exists(self):
--
2.35.3

View File

@ -0,0 +1,24 @@
From eeeaac9a46f3568e0a116048068ff99d0dccf25c Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 30 Jun 2022 14:49:16 +0200
Subject: [PATCH] fix 'pcs resource restart' traceback
---
pcs/resource.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/pcs/resource.py b/pcs/resource.py
index eb59d703..8d402c22 100644
--- a/pcs/resource.py
+++ b/pcs/resource.py
@@ -2596,7 +2596,6 @@ def resource_restart(
Options:
* --wait
"""
- del lib
modifiers.ensure_only_supported("--wait")
if not argv:
utils.err("You must specify a resource to restart")
--
2.35.3

View File

@ -1,4 +1,4 @@
From 826b217734dc7d56199749382f4845193b38f1d1 Mon Sep 17 00:00:00 2001
From efd5edbfc96a2d85ee0575beca8b163b4ab9179f Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Wed, 10 Aug 2022 14:47:53 +0200
Subject: [PATCH] fix ruby socket permissions
@ -42,5 +42,5 @@ index e2c5e2a1..4fde639e 100644
return [200, {}, [response.to_json.to_str]]
end
--
2.37.1
2.37.3

View File

@ -1,4 +1,4 @@
From 49d9c698697b0dd49f53b60340705b4fd656e248 Mon Sep 17 00:00:00 2001
From 2a578689db8522971840dbb1644a21c341fe7d83 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL9
@ -9,7 +9,7 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL9
2 files changed, 3 insertions(+)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index 0bbee071..ba14251d 100644
index 363515bb..4c2496aa 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -457,6 +457,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
@ -22,10 +22,10 @@ index 0bbee071..ba14251d 100644
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index bc885918..4e286f46 100644
index cfa2ac9c..519c853e 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -916,6 +916,7 @@ Commands:
@@ -1429,6 +1429,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:
@ -34,5 +34,5 @@ index bc885918..4e286f46 100644
support traffic encryption nor compression.
Transport options are:
--
2.31.1
2.35.1

View File

@ -1,25 +0,0 @@
From f759872276ed8ff04bbf05010c18bbe4d1abdb11 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Tue, 1 Feb 2022 16:10:35 +0100
Subject: [PATCH 2/2] fix translating resource roles in colocation constraints
---
pcs/lib/xml_tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcs/lib/xml_tools.py b/pcs/lib/xml_tools.py
index 07752f92..6a652fd1 100644
--- a/pcs/lib/xml_tools.py
+++ b/pcs/lib/xml_tools.py
@@ -66,7 +66,7 @@ def export_attributes(
result = {str(key): str(value) for key, value in element.attrib.items()}
if not with_id:
result.pop("id", None)
- for role_name in ("role", "rsc-role"):
+ for role_name in ("role", "rsc-role", "with-rsc-role"):
if role_name in result:
result[role_name] = pacemaker.role.get_value_primary(
const.PcmkRoleType(result[role_name].capitalize())
--
2.34.1

View File

@ -1,26 +0,0 @@
From f44cdc871a39da3960bd04565b4d1d5ffa19bd23 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Thu, 20 Jan 2022 13:32:49 +0100
Subject: [PATCH 1/2] simplify ternar expression
The motivation for this is that covscan complains about it.
---
src/app/view/share/useUrlTabs.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/view/share/useUrlTabs.ts b/src/app/view/share/useUrlTabs.ts
index 7278dad8..a1136bf3 100644
--- a/src/app/view/share/useUrlTabs.ts
+++ b/src/app/view/share/useUrlTabs.ts
@@ -13,7 +13,7 @@ export const useUrlTabs = <TABS extends ReadonlyArray<string>>(
return {
currentTab,
- matchedContext: tab !== null ? tab.matched : `/${defaultTab}`,
+ matchedContext: tab?.matched ?? `/${defaultTab}`,
tabList,
};
};
--
2.31.1

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.11.1
Release: 10%{?dist}.2
Version: 0.11.3
Release: 4%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
@ -9,7 +9,7 @@ Release: 10%{?dist}.2
# rack-test, sinatra, tilt
# GPLv2 or Ruby: eventmachne
# (GPLv2 or Ruby) and BSD: thin
# BSD or Ruby: open4, rexml, ruby2_keywords, webrick
# BSD or Ruby: open4, ruby2_keywords, webrick
# BSD and MIT: ffi
License: GPLv2 and ASL 2.0 and MIT and BSD and (GPLv2 or Ruby) and (BSD or Ruby)
URL: https://github.com/ClusterLabs/pcs
@ -19,13 +19,13 @@ Summary: Pacemaker Configuration System
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_or_commit %{version}
# %%global version_or_commit %%{version}.210-9862
# %%global version_or_commit %%{version}.44-9da7
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.12
%global ui_modules_version 0.1.12
%global ui_commit 0.1.14
%global ui_modules_version 0.1.14
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pcs_snmp_pkg_name pcs-snmp
@ -33,20 +33,19 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global pyagentx_version 0.4.pcs.2
%global tornado_version 6.1.0
%global dacite_version 1.6.0
%global version_rubygem_backports 3.17.2
%global version_rubygem_daemons 1.3.1
%global version_rubygem_ethon 0.12.0
%global version_rubygem_backports 3.23.0
%global version_rubygem_daemons 1.4.1
%global version_rubygem_ethon 0.15.0
%global version_rubygem_eventmachine 1.2.7
%global version_rubygem_ffi 1.13.1
%global version_rubygem_ffi 1.15.5
%global version_rubygem_mustermann 1.1.1
%global version_rubygem_open4 1.3.4
%global version_rubygem_rack 2.2.3
%global version_rubygem_rack 2.2.3.1
%global version_rubygem_rack_protection 2.2.0
%global version_rubygem_rack_test 1.1.0
%global version_rubygem_rexml 3.2.5
%global version_rubygem_ruby2_keywords 0.0.2
%global version_rubygem_ruby2_keywords 0.0.5
%global version_rubygem_sinatra 2.2.0
%global version_rubygem_thin 1.7.2
%global version_rubygem_thin 1.8.1
%global version_rubygem_tilt 2.0.10
%global version_rubygem_webrick 1.7.0
@ -81,7 +80,6 @@ Source44: https://github.com/konradhalas/dacite/archive/v%{dacite_version}/dacit
Source81: https://rubygems.org/downloads/backports-%{version_rubygem_backports}.gem
Source82: https://rubygems.org/downloads/ethon-%{version_rubygem_ethon}.gem
Source83: https://rubygems.org/downloads/ffi-%{version_rubygem_ffi}.gem
Source85: https://rubygems.org/downloads/rexml-%{version_rubygem_rexml}.gem
Source86: https://rubygems.org/downloads/mustermann-%{version_rubygem_mustermann}.gem
# We needed to re-upload open4 rubygem because of issues with sources in gating.
# Unfortunately, there was no newer version available, therefore we had to
@ -106,27 +104,20 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_comm
# Z-streams are exception here: they can come from upstream but should be
# applied at the end to keep z-stream changes as straightforward as possible.
# Patch1: bzNUMBER-01-name.patch
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
Patch9: bz20486401-01-Fix-snmp-client.patch
Patch10: fix-translating-resource-roles-in-colocation-constra.patch
Patch11: bz2116839-01-fix-ruby-socket-permissions.patch
# Downstream patches do not come from upstream. They adapt pcs for specific
# RHEL needs.
# pcs patches: <= 200
Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch
Patch2: bz2102663-01-fix-pcs-resource-restart-traceback.patch
Patch3: bz2058243-01-code-formatting.patch
Patch4: bz2058243-02-make-booth-ticket-mode-value-case-insensitive.patch
Patch5: bz2026725-01-booth-sync-check-whether-etc-booth-exists.patch
Patch6: bz2116841-01-fix-ruby-socket-permissions.patch
# ui patches: >200
# Patch201: bzNUMBER-01-name.patch
Patch201: simplify-ternar-expression.patch
Patch202: bz2044409-01-fix-backend-parameter-all-in-cluster-destroy.patch
# git for patches
BuildRequires: git-core
@ -155,8 +146,9 @@ BuildRequires: ruby >= 2.5
BuildRequires: ruby-devel
BuildRequires: rubygems
BuildRequires: rubygem-bundler
# ruby libraries for tests
BuildRequires: rubygem-json
BuildRequires: rubygem-rexml
# ruby libraries for tests
BuildRequires: rubygem-test-unit
# for touching patch files (sanitization function)
BuildRequires: diffstat
@ -189,6 +181,7 @@ Requires: python3-cryptography
Requires: ruby >= 2.5
Requires: rubygems
Requires: rubygem-json
Requires: rubygem-rexml
# for killall
Requires: psmisc
# cluster stack and related packages
@ -222,7 +215,6 @@ Provides: bundled(open4) = %{version_rubygem_open4}
Provides: bundled(rack) = %{version_rubygem_rack}
Provides: bundled(rack_protection) = %{version_rubygem_rack_protection}
Provides: bundled(rack_test) = %{version_rubygem_rack_test}
Provides: bundled(rexml) = %{version_rubygem_rexml}
Provides: bundled(ruby2_keywords) = %{version_rubygem_ruby2_keywords}
Provides: bundled(sinatra) = %{version_rubygem_sinatra}
Provides: bundled(thin) = %{version_rubygem_thin}
@ -302,8 +294,6 @@ update_times_patch(){
%autosetup -D -T -b 100 -a 101 -S git -n %{ui_src_name} -N
%autopatch -p1 -m 201
# update_times_patch %%{PATCH201}
update_times_patch %{PATCH201}
update_times_patch %{PATCH202}
# patch pcs sources
%autosetup -S git -n %{pcs_source_name} -N
@ -314,11 +304,6 @@ update_times_patch %{PATCH3}
update_times_patch %{PATCH4}
update_times_patch %{PATCH5}
update_times_patch %{PATCH6}
update_times_patch %{PATCH7}
update_times_patch %{PATCH8}
update_times_patch %{PATCH9}
update_times_patch %{PATCH10}
update_times_patch %{PATCH11}
# prepare dirs/files necessary for building all bundles
# -----------------------------------------------------
@ -328,7 +313,6 @@ mkdir -p %{rubygem_cache_dir}
cp -f %SOURCE81 %{rubygem_cache_dir}
cp -f %SOURCE82 %{rubygem_cache_dir}
cp -f %SOURCE83 %{rubygem_cache_dir}
cp -f %SOURCE85 %{rubygem_cache_dir}
cp -f %SOURCE86 %{rubygem_cache_dir}
# For reason why we are renaming open4 rubygem, see comment of source
# definition above.
@ -387,7 +371,6 @@ mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE.SPECS ffi_LICEN
mv %{rubygem_bundle_dir}/gems/mustermann-%{version_rubygem_mustermann}/LICENSE mustermann_LICENSE
mv %{rubygem_bundle_dir}/gems/open4-%{version_rubygem_open4}/LICENSE open4_LICENSE
mv %{rubygem_bundle_dir}/gems/rack-%{version_rubygem_rack}/MIT-LICENSE rack_MIT-LICENSE
mv %{rubygem_bundle_dir}/gems/rexml-%{version_rubygem_rexml}/LICENSE.txt rexml_LICENSE.txt
mv %{rubygem_bundle_dir}/gems/rack-protection-%{version_rubygem_rack_protection}/License rack-protection_License
mv %{rubygem_bundle_dir}/gems/rack-test-%{version_rubygem_rack_test}/MIT-LICENSE.txt rack-test_MIT-LICENSE.txt
mv %{rubygem_bundle_dir}/gems/sinatra-%{version_rubygem_sinatra}/LICENSE sinatra_LICENSE
@ -515,7 +498,6 @@ run_all_tests
%license rack_MIT-LICENSE
%license rack-protection_License
%license rack-test_MIT-LICENSE.txt
%license rexml_LICENSE.txt
%license sinatra_LICENSE
%license tilt_COPYING
%license webrick_LICENSE.txt
@ -559,13 +541,35 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Thu Aug 11 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-10.el9_0.2
* Mon Sep 05 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-4
- Fixed ruby socket permissions
- Resolves: rhbz#2116839
- Resolves: rhbz#2116841
* Tue May 10 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-10.el9_0.1
* Thu Jul 28 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-3
- Fixed booth ticket mode value case insensitive
- Fixed booth sync check whether /etc/booth exists
- Resolves: rhbz#2026725 rhbz#2058243
* Tue Jul 12 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-2
- Fixed 'pcs resource restart' traceback
- Resolves: rhbz#2102663
* Fri Jun 24 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Updated bundled rubygems: rack
- Resolves: rhbz#2059122 rhbz#2059177 rhbz#2059501 rhbz#2095695 rhbz#2096886 rhbz#2097730 rhbz#2097731 rhbz#2097732 rhbz#2097733 rhbz#2097778
* Thu May 19 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.2-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Updated bundled rubygems: backports, daemons, ethon ffi, ruby2_keywords, thin
- Stopped bundling rubygem-rexml (use distribution package instead)
- Resolves: rhbz#1301204 rhbz#2024522 rhbz#2026725 rhbz#2029844 rhbz#2039884 rhbz#2053177 rhbz#2054671 rhbz#2058243 rhbz#2058246 rhbz#2058247 rhbz#2058251 rhbz#2058252 rhbz#2059142 rhbz#2059145 rhbz#2059148 rhbz#2059149 rhbz#2059501 rhbz#2064818 rhbz#2068457 rhbz#2076585
* Wed May 04 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-11
- Updated bundled rubygems: sinatra, rack-protection
- Resolves: rhbz#2081333
- Resolves: rhbz#2081334
* Tue Feb 01 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.1-10
- Fixed snmp client