diff --git a/.gitignore b/.gitignore index 9de9a82..a2c9ad6 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,17 @@ /pcs-web-ui-node-modules-0.1.22.tar.xz /pcs-0.12.0.tar.gz /rack-3.1.10.gem +/backports-3.25.1.gem +/childprocess-5.1.0.gem +/ffi-1.17.2.gem +/puma-6.6.0.gem +/rack-3.1.14.gem +/rack-protection-4.1.1.gem +/rack-session-2.1.1.gem +/rack-test-2.2.0.gem +/sinatra-4.1.1.gem +/dacite-1.9.2.tar.gz +/pcs-71bb3c8e22436db810c7c7ec1675d49e0062b2ee.tar.gz +/pcs-web-ui-54730df523389a3c87abad7e47c44e30b33a2647.tar.gz +/pcs-web-ui-node-modules-0.1.22+62-5473.tar.xz +/tilt-2.6.0.gem diff --git a/RHEL-78654-fix-filter-clones-by-agent-name-in-resource-tree.patch b/RHEL-78654-fix-filter-clones-by-agent-name-in-resource-tree.patch deleted file mode 100644 index 2ddaf01..0000000 --- a/RHEL-78654-fix-filter-clones-by-agent-name-in-resource-tree.patch +++ /dev/null @@ -1,82 +0,0 @@ -From e949ae0e2fc350ed1e74ce48b50ac812efd92f30 Mon Sep 17 00:00:00 2001 -From: Ivan Devat -Date: Mon, 20 Jan 2025 12:13:25 +0100 -Subject: [PATCH] fix: filter clones by agent name in resource tree - ---- - .../src/app/view/cluster/resources/tree/filter.ts | 13 +++++++------ - .../test/src/test/scenes/resources/tree.test.ts | 14 +++++++++++--- - 2 files changed, 18 insertions(+), 9 deletions(-) - -diff --git a/packages/app/src/app/view/cluster/resources/tree/filter.ts b/packages/app/src/app/view/cluster/resources/tree/filter.ts -index 118e6cc2..b047a094 100644 ---- a/packages/app/src/app/view/cluster/resources/tree/filter.ts -+++ b/packages/app/src/app/view/cluster/resources/tree/filter.ts -@@ -1,4 +1,4 @@ --import {Resource} from "app/view/cluster/types"; -+import type {FenceDevice, Resource} from "app/view/cluster/types"; - - type Group = Extract; - type Clone = Extract; -@@ -14,13 +14,14 @@ const createResourceFilter = (filter: string) => { - const match = (searchable: string) => - searchable.toLowerCase().includes(filter.toLowerCase()); - -+ const matchPrimitive = (primitive: Primitive | FenceDevice) => -+ match(primitive.id) || match(primitive.agentName); -+ - const filterPrimitive = (primitive: Primitive) => -- match(primitive.id) || match(primitive.agentName) ? primitive : null; -+ matchPrimitive(primitive) ? primitive : null; - - const filterGroup = (group: Group): Group | null => { -- const primitives = group.resources.filter( -- primitive => match(primitive.id) || match(primitive.agentName), -- ); -+ const primitives = group.resources.filter(matchPrimitive); - return match(group.id) || primitives.length > 0 - ? {...group, resources: primitives} - : null; -@@ -34,7 +35,7 @@ const createResourceFilter = (filter: string) => { - : null; - } - -- if (match(clone.member.id)) { -+ if (matchPrimitive(clone.member)) { - return clone; - } - -diff --git a/packages/test/src/test/scenes/resources/tree.test.ts b/packages/test/src/test/scenes/resources/tree.test.ts -index f9b118f8..19190955 100644 ---- a/packages/test/src/test/scenes/resources/tree.test.ts -+++ b/packages/test/src/test/scenes/resources/tree.test.ts -@@ -19,7 +19,15 @@ const resourceList = [ - "Clone1", - cs.group("Group2", [cs.primitive("ResourceD"), cs.primitive("ResourceE")]), - ), -- cs.clone("Clone2", cs.primitive("ResourceF")), -+ cs.clone( -+ "Clone2", -+ cs.primitive("ResourceF", { -+ agentname: "ocf:heartbeat:apache", -+ provider: "heartbeat", -+ class: "ocf", -+ type: "apache", -+ }), -+ ), - ]; - - const primitiveItem = (id: string) => -@@ -129,7 +137,7 @@ describe("Resource tree filter", () => { - await isAbsent(groupItem("Group2")); - await isAbsent(primitiveItem("ResourceD")); - await isAbsent(primitiveItem("ResourceE")); -- await isAbsent(cloneItem("Clone2")); -- await isAbsent(primitiveItem("ResourceF")); -+ await isVisible(cloneItem("Clone2")); -+ await isVisible(primitiveItem("ResourceF")); - }); - }); --- -2.48.1 - diff --git a/RHEL-79033-fix-restarting-bundle-instances.patch b/RHEL-79033-fix-restarting-bundle-instances.patch deleted file mode 100644 index 3828c5f..0000000 --- a/RHEL-79033-fix-restarting-bundle-instances.patch +++ /dev/null @@ -1,169 +0,0 @@ -From df6e16235702f3d5f2bb8eb24e633a75c27e1e70 Mon Sep 17 00:00:00 2001 -From: Tomas Jelinek -Date: Wed, 12 Feb 2025 14:00:26 +0100 -Subject: [PATCH 1/2] fix restarting bundle instances - -* fixes a regression introduced in 557ea61b7cfb7948fb2f60916dda84651c4ef4f8 ---- - pcs/lib/commands/resource.py | 98 ++++++++++--------- - .../lib/commands/resource/test_restart.py | 16 +-- - 2 files changed, 54 insertions(+), 60 deletions(-) - -diff --git a/pcs/lib/commands/resource.py b/pcs/lib/commands/resource.py -index db9be21fe..10a43e1cc 100644 ---- a/pcs/lib/commands/resource.py -+++ b/pcs/lib/commands/resource.py -@@ -2665,63 +2665,69 @@ def restart( - timeout -- abort if the command doesn't finish in this time (integer + unit) - """ - cib = env.get_cib() -+ -+ # To be able to restart bundle instances, which are not to be found in CIB, -+ # do not fail if specified ID is not found in CIB. Pacemaker provides -+ # reasonable messages when the ID to be restarted is not a resource or -+ # doesn't exist. We only search for the resource in order to provide hints -+ # when the user attempts to restart bundle's or clone's inner resources. -+ resource_found = False - try: - resource_el = get_element_by_id(cib, resource_id) -- except ElementNotFound as e: -- env.report_processor.report( -- ReportItem.error( -- reports.messages.IdNotFound( -- resource_id, expected_types=["resource"] -+ resource_found = True -+ except ElementNotFound: -+ pass -+ -+ if resource_found: -+ if not resource.common.is_resource(resource_el): -+ env.report_processor.report( -+ ReportItem.error( -+ reports.messages.IdBelongsToUnexpectedType( -+ resource_id, -+ expected_types=["resource"], -+ current_type=resource_el.tag, -+ ) - ) - ) -- ) -- raise LibraryError() from e -- if not resource.common.is_resource(resource_el): -- env.report_processor.report( -- ReportItem.error( -- reports.messages.IdBelongsToUnexpectedType( -- resource_id, -- expected_types=["resource"], -- current_type=resource_el.tag, -+ raise LibraryError() -+ -+ if resource.stonith.is_stonith(resource_el): -+ env.report_processor.report( -+ reports.ReportItem.error( -+ reports.messages.CommandArgumentTypeMismatch( -+ "stonith resource" -+ ) - ) - ) -- ) -- raise LibraryError() -- if resource.stonith.is_stonith(resource_el): -- env.report_processor.report( -- reports.ReportItem.error( -- reports.messages.CommandArgumentTypeMismatch("stonith resource") -- ) -- ) -- raise LibraryError() -+ raise LibraryError() - -- parent_resource_el = resource.clone.get_parent_any_clone(resource_el) -- if parent_resource_el is None: -- parent_resource_el = resource.bundle.get_parent_bundle(resource_el) -- if parent_resource_el is not None: -- env.report_processor.report( -- reports.ReportItem.warning( -- reports.messages.ResourceRestartUsingParentRersource( -- str(resource_el.attrib["id"]), -- str(parent_resource_el.attrib["id"]), -+ parent_resource_el = resource.clone.get_parent_any_clone(resource_el) -+ if parent_resource_el is None: -+ parent_resource_el = resource.bundle.get_parent_bundle(resource_el) -+ if parent_resource_el is not None: -+ env.report_processor.report( -+ reports.ReportItem.warning( -+ reports.messages.ResourceRestartUsingParentRersource( -+ str(resource_el.attrib["id"]), -+ str(parent_resource_el.attrib["id"]), -+ ) - ) - ) -- ) -- resource_el = parent_resource_el -+ resource_el = parent_resource_el - -- if node and not ( -- resource.clone.is_any_clone(resource_el) -- or resource.bundle.is_bundle(resource_el) -- ): -- env.report_processor.report( -- reports.ReportItem.error( -- reports.messages.ResourceRestartNodeIsForMultiinstanceOnly( -- str(resource_el.attrib["id"]), -- resource_el.tag, -- node, -+ if node and not ( -+ resource.clone.is_any_clone(resource_el) -+ or resource.bundle.is_bundle(resource_el) -+ ): -+ env.report_processor.report( -+ reports.ReportItem.error( -+ reports.messages.ResourceRestartNodeIsForMultiinstanceOnly( -+ str(resource_el.attrib["id"]), -+ resource_el.tag, -+ node, -+ ) - ) - ) -- ) - - if timeout is not None: - env.report_processor.report_list( -@@ -2733,7 +2739,7 @@ def restart( - - resource_restart( - env.cmd_runner(), -- str(resource_el.attrib["id"]), -+ str(resource_el.attrib["id"]) if resource_found else resource_id, - node=node, - timeout=timeout, - ) -diff --git a/pcs_test/tier0/lib/commands/resource/test_restart.py b/pcs_test/tier0/lib/commands/resource/test_restart.py -index d3c8fae92..7c072dc5f 100644 ---- a/pcs_test/tier0/lib/commands/resource/test_restart.py -+++ b/pcs_test/tier0/lib/commands/resource/test_restart.py -@@ -104,20 +104,8 @@ class ResourceRestart(TestCase): - ) - - def test_resource_not_found(self): -- self.env_assist.assert_raise_library_error( -- lambda: resource.restart(self.env_assist.get_env(), "RX") -- ) -- self.env_assist.assert_reports( -- [ -- fixture.error( -- reports.codes.ID_NOT_FOUND, -- id="RX", -- expected_types=["resource"], -- context_type="", -- context_id="", -- ) -- ] -- ) -+ self.config.runner.pcmk.resource_restart("RX") -+ resource.restart(self.env_assist.get_env(), "RX") - - def test_not_a_resource(self): - self.env_assist.assert_raise_library_error( --- -2.48.1 - diff --git a/RHEL-79090-fix-deletion-of-misconfigured-bundles.patch b/RHEL-79090-fix-deletion-of-misconfigured-bundles.patch deleted file mode 100644 index 2278eec..0000000 --- a/RHEL-79090-fix-deletion-of-misconfigured-bundles.patch +++ /dev/null @@ -1,280 +0,0 @@ -From ae5fbbefab98618c644befe80c8791d513bdd711 Mon Sep 17 00:00:00 2001 -From: Peter Romancik -Date: Thu, 13 Feb 2025 11:03:20 +0100 -Subject: [PATCH 2/2] fix deletion of misconfigured bundles - ---- - pcs/common/reports/codes.py | 3 + - pcs/common/reports/messages.py | 30 +++++++++ - pcs/lib/cib/remove_elements.py | 59 +++++++++++------ - .../tier0/common/reports/test_messages.py | 23 +++++++ - pcs_test/tier0/lib/commands/test_cib.py | 66 +++++++++++++++++++ - 5 files changed, 162 insertions(+), 19 deletions(-) - -diff --git a/pcs/common/reports/codes.py b/pcs/common/reports/codes.py -index cde8365f6..0da1aa08b 100644 ---- a/pcs/common/reports/codes.py -+++ b/pcs/common/reports/codes.py -@@ -182,6 +182,9 @@ CLUSTER_UUID_ALREADY_SET = M("CLUSTER_UUID_ALREADY_SET") - CLUSTER_WILL_BE_DESTROYED = M("CLUSTER_WILL_BE_DESTROYED") - COMMAND_INVALID_PAYLOAD = M("COMMAND_INVALID_PAYLOAD") - COMMAND_UNKNOWN = M("COMMAND_UNKNOWN") -+CONFIGURED_RESOURCE_MISSING_IN_STATUS = M( -+ "CONFIGURED_RESOURCE_MISSING_IN_STATUS" -+) - LIVE_ENVIRONMENT_NOT_CONSISTENT = M("LIVE_ENVIRONMENT_NOT_CONSISTENT") - LIVE_ENVIRONMENT_REQUIRED = M("LIVE_ENVIRONMENT_REQUIRED") - LIVE_ENVIRONMENT_REQUIRED_FOR_LOCAL_NODE = M( -diff --git a/pcs/common/reports/messages.py b/pcs/common/reports/messages.py -index b8e151ef4..23bebd1f5 100644 ---- a/pcs/common/reports/messages.py -+++ b/pcs/common/reports/messages.py -@@ -31,6 +31,7 @@ from pcs.common.resource_agent.dto import ( - ResourceAgentNameDto, - get_resource_agent_full_name, - ) -+from pcs.common.resource_status import ResourceState - from pcs.common.str_tools import ( - format_list, - format_list_custom_last_separator, -@@ -6430,6 +6431,35 @@ class CannotStopResourcesBeforeDeleting(ReportItemMessage): - ) - - -+@dataclass(frozen=True) -+class ConfiguredResourceMissingInStatus(ReportItemMessage): -+ """ -+ Cannot check status of resource, because the resource is missing in cluster -+ status despite being configured in CIB. This happens for misconfigured -+ resources, e.g. bundle with primitive resource inside and no IP address -+ for the bundle specified. -+ -+ resource_id -- id of the resource -+ checked_state -- expected state of the resource -+ """ -+ -+ resource_id: str -+ checked_state: Optional[ResourceState] = None -+ _code = codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS -+ -+ @property -+ def message(self) -> str: -+ return ( -+ "Cannot check if the resource '{resource_id}' is in expected " -+ "state{state}, since the resource is missing in cluster status" -+ ).format( -+ resource_id=self.resource_id, -+ state=format_optional( -+ self.checked_state and self.checked_state.name.lower(), " ({})" -+ ), -+ ) -+ -+ - @dataclass(frozen=True) - class ResourceBanPcmkError(ReportItemMessage): - """ -diff --git a/pcs/lib/cib/remove_elements.py b/pcs/lib/cib/remove_elements.py -index d9596a679..d601f85c1 100644 ---- a/pcs/lib/cib/remove_elements.py -+++ b/pcs/lib/cib/remove_elements.py -@@ -251,17 +251,27 @@ def warn_resource_unmanaged( - report_list.extend(parser.get_warnings()) - - status = ResourcesStatusFacade.from_resources_status_dto(status_dto) -- report_list.extend( -- reports.ReportItem.warning( -- reports.messages.ResourceIsUnmanaged(resource_id) -- ) -- for resource_id in resource_ids -- if status.is_state( -- resource_id, -- None, -- ResourceState.UNMANAGED, -- ) -- ) -+ for r_id in resource_ids: -+ if not status.exists(r_id, None): -+ # Pacemaker does not put misconfigured resources into cluster -+ # status and we are unable to check state of such resources. -+ # This happens for e.g. undle with primitive resource inside and -+ # no IP address for the bundle specified. We expect the resource -+ # to be stopped since it is misconfigured. Stopping it again -+ # even when it is unmanaged should not break anything. -+ report_list.append( -+ reports.ReportItem.debug( -+ reports.messages.ConfiguredResourceMissingInStatus( -+ r_id, ResourceState.UNMANAGED -+ ) -+ ) -+ ) -+ elif status.is_state(r_id, None, ResourceState.UNMANAGED): -+ report_list.append( -+ reports.ReportItem.warning( -+ reports.messages.ResourceIsUnmanaged(r_id) -+ ) -+ ) - except NotImplementedError: - # TODO remove when issue with bundles in status is fixed - report_list.extend( -@@ -310,20 +320,31 @@ def ensure_resources_stopped( - report_list.extend(parser.get_warnings()) - - status = ResourcesStatusFacade.from_resources_status_dto(status_dto) -- not_stopped_ids = [ -- resource_id -- for resource_id in resource_ids -- if not status.is_state( -- resource_id, -+ for r_id in resource_ids: -+ if not status.exists(r_id, None): -+ # Pacemaker does not put misconfigured resources into cluster -+ # status and we are unable to check state of such resources. -+ # This happens for e.g. undle with primitive resource inside and -+ # no IP address for the bundle specified. We expect the resource -+ # to be stopped since it is misconfigured. -+ report_list.append( -+ reports.ReportItem.debug( -+ reports.messages.ConfiguredResourceMissingInStatus( -+ r_id, ResourceState.STOPPED -+ ) -+ ) -+ ) -+ elif not status.is_state( -+ r_id, - None, - ResourceState.STOPPED, - instances_quantifier=( - MoreChildrenQuantifierType.ALL -- if status.can_have_multiple_instances(resource_id) -+ if status.can_have_multiple_instances(r_id) - else None - ), -- ) -- ] -+ ): -+ not_stopped_ids.append(r_id) - except NotImplementedError: - # TODO remove when issue with bundles in status is fixed - not_stopped_ids = [ -diff --git a/pcs_test/tier0/common/reports/test_messages.py b/pcs_test/tier0/common/reports/test_messages.py -index f2e2fb70c..b4eff2a20 100644 ---- a/pcs_test/tier0/common/reports/test_messages.py -+++ b/pcs_test/tier0/common/reports/test_messages.py -@@ -11,6 +11,7 @@ from pcs.common.file import RawFileError - from pcs.common.reports import const - from pcs.common.reports import messages as reports - from pcs.common.resource_agent.dto import ResourceAgentNameDto -+from pcs.common.resource_status import ResourceState - from pcs.common.types import CibRuleExpressionType - - # pylint: disable=too-many-lines -@@ -6101,3 +6102,25 @@ class CannotStopResourcesBeforeDeleting(NameBuildTest): - ["resourceId1", "resourceId2"] - ), - ) -+ -+ -+class ConfiguredResourceMissingInStatus(NameBuildTest): -+ def test_only_resource_id(self): -+ self.assert_message_from_report( -+ ( -+ "Cannot check if the resource 'id' is in expected state, " -+ "since the resource is missing in cluster status" -+ ), -+ reports.ConfiguredResourceMissingInStatus("id"), -+ ) -+ -+ def test_with_expected_state(self): -+ self.assert_message_from_report( -+ ( -+ "Cannot check if the resource 'id' is in expected state " -+ "(stopped), since the resource is missing in cluster status" -+ ), -+ reports.ConfiguredResourceMissingInStatus( -+ "id", ResourceState.STOPPED -+ ), -+ ) -diff --git a/pcs_test/tier0/lib/commands/test_cib.py b/pcs_test/tier0/lib/commands/test_cib.py -index 603447689..78bdaa85a 100644 ---- a/pcs_test/tier0/lib/commands/test_cib.py -+++ b/pcs_test/tier0/lib/commands/test_cib.py -@@ -5,6 +5,7 @@ from unittest import ( - ) - - from pcs.common import reports -+from pcs.common.resource_status import ResourceState - from pcs.lib.commands import cib as lib - - from pcs_test.tools import fixture -@@ -949,3 +950,68 @@ class RemoveElementsStopResources(TestCase, StopResourcesWaitMixin): - ), - ] - ) -+ -+ def test_skip_state_check_on_missing_from_status(self): -+ self.config.runner.cib.load( -+ resources=""" -+ -+ -+ -+ -+ -+ -+ """ -+ ) -+ self.fixture_stop_resources_wait_calls( -+ self.config.calls.get("runner.cib.load").stdout, -+ initial_state_modifiers={"resources": ""}, -+ after_disable_cib_modifiers={ -+ "resources": """ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ """ -+ }, -+ after_disable_state_modifiers={"resources": ""}, -+ ) -+ self.fixture_push_cib_after_stopping( -+ resources=""" -+ -+ -+ -+ -+ -+ """ -+ ) -+ lib.remove_elements(self.env_assist.get_env(), ["apa"]) -+ self.env_assist.assert_reports( -+ [ -+ fixture.info( -+ reports.codes.STOPPING_RESOURCES_BEFORE_DELETING, -+ resource_id_list=["apa"], -+ ), -+ fixture.debug( -+ reports.codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS, -+ resource_id="apa", -+ checked_state=ResourceState.UNMANAGED, -+ ), -+ fixture.info(reports.codes.WAIT_FOR_IDLE_STARTED, timeout=0), -+ fixture.debug( -+ reports.codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS, -+ resource_id="apa", -+ checked_state=ResourceState.STOPPED, -+ ), -+ fixture.info( -+ reports.codes.CIB_REMOVE_REFERENCES, -+ id_tag_map={"apa": "primitive", "test-bundle": "bundle"}, -+ removing_references_from={"apa": {"test-bundle"}}, -+ ), -+ ] -+ ) --- -2.48.1 - diff --git a/do-not-support-cluster-setup-with-udp-u-transport.patch b/do-not-support-cluster-setup-with-udp-u-transport.patch index 465b297..81e33ab 100644 --- a/do-not-support-cluster-setup-with-udp-u-transport.patch +++ b/do-not-support-cluster-setup-with-udp-u-transport.patch @@ -1,7 +1,8 @@ -From 7bfa2ad4f4f5f59fd501b0cec23cdc489f90a09e Mon Sep 17 00:00:00 2001 +From a311caa8d5a9450517b74775f42f756cb240f963 Mon Sep 17 00:00:00 2001 From: Michal Pospisil Date: Thu, 23 May 2024 17:22:12 +0200 -Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL10 +Subject: [PATCH 1/2] do not support cluster setup with udp(u) transport in + RHEL10 --- pcs/pcs.8.in | 2 ++ @@ -9,7 +10,7 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL10 2 files changed, 3 insertions(+) diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in -index 0bc1a4e5..4dea3582 100644 +index e2ca2d59..051de0c4 100644 --- a/pcs/pcs.8.in +++ b/pcs/pcs.8.in @@ -479,6 +479,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable @@ -22,10 +23,10 @@ index 0bc1a4e5..4dea3582 100644 .br Transport options are: ip_version, netmtu diff --git a/pcs/usage.py b/pcs/usage.py -index 26204c59..31eba549 100644 +index ac1376f2..187d0b1a 100644 --- a/pcs/usage.py +++ b/pcs/usage.py -@@ -1496,6 +1496,7 @@ Commands: +@@ -1502,6 +1502,7 @@ Commands: hash=sha256. To disable encryption, set cipher=none and hash=none. Transports udp and udpu: @@ -34,5 +35,5 @@ index 26204c59..31eba549 100644 support traffic encryption nor compression. Transport options are: -- -2.45.1 +2.49.0 diff --git a/pcs.spec b/pcs.spec index 92bd455..4ca3db2 100644 --- a/pcs.spec +++ b/pcs.spec @@ -1,6 +1,6 @@ Name: pcs Version: 0.12.0 -Release: 4%{?dist} +Release: 5%{?dist} # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses # GPL-2.0-only: pcs @@ -23,29 +23,29 @@ ExclusiveArch: x86_64 s390x ppc64le aarch64 riscv64 # To build an official pcs release, comment out branch_or_commit # Use long commit hash or branch name to build an unreleased version -# %%global branch_or_commit 1353dfbb3af82d77f4de17a3fa4cbde185bb2b2d +%global branch_or_commit 71bb3c8e22436db810c7c7ec1675d49e0062b2ee +%global version_or_commit %{clean_version} %if 0%{?branch_or_commit:1} %global version_or_commit %{branch_or_commit} -%else - %global version_or_commit %{clean_version} + %global tarball_version %{clean_version}+%(echo %{branch_or_commit} | head -c 8) %endif %global pcs_source_name %{name}-%{version_or_commit} # To build an official pcs-web-ui release, comment out ui_branch_or_commit # Last tagged version, also used as fallback version for untagged tarballs %global ui_version 0.1.22 +%global ui_modules_version 0.1.22+62-5473 # Use long commit hash or branch name to build an unreleased version -# %%global ui_branch_or_commit 34372d1268f065ed186546f55216aaa2d7e76b54 +%global ui_branch_or_commit 54730df523389a3c87abad7e47c44e30b33a2647 +%global ui_version_or_commit %{ui_version} %if 0%{?ui_branch_or_commit:1} %global ui_version_or_commit %{ui_branch_or_commit} -%else - %global ui_version_or_commit %{ui_version} + %global ui_tarball_version %{ui_version}-%(echo %{ui_branch_or_commit} | head -c 8) %endif %global ui_src_name pcs-web-ui-%{ui_version_or_commit} -%global ui_modules_version 0.1.22 -%global dacite_version 1.8.1 +%global dacite_version 1.9.2 %global pyagentx_version 0.4.pcs.2 %global pycurl_version 7.45.3 @@ -58,21 +58,21 @@ ExclusiveArch: x86_64 s390x ppc64le aarch64 riscv64 %global curlver_h /usr/include/curl/curlver.h %global libcurl_ver %(sed %{libcurl_sed} %{curlver_h} 2>/dev/null || echo 0) -%global version_rubygem_backports 3.25.0 +%global version_rubygem_backports 3.25.1 %global version_rubygem_base64 0.2.0 -%global version_rubygem_childprocess 5.0.0 +%global version_rubygem_childprocess 5.1.0 %global version_rubygem_ethon 0.16.0 -%global version_rubygem_ffi 1.17.0 +%global version_rubygem_ffi 1.17.2 %global version_rubygem_mustermann 3.0.3 %global version_rubygem_nio4r 2.7.4 -%global version_rubygem_puma 6.4.3 -%global version_rubygem_rack 3.1.10 -%global version_rubygem_rack_protection 4.0.0 -%global version_rubygem_rack_session 2.0.0 -%global version_rubygem_rack_test 2.1.0 +%global version_rubygem_puma 6.6.0 +%global version_rubygem_rack 3.1.14 +%global version_rubygem_rack_protection 4.1.1 +%global version_rubygem_rack_session 2.1.1 +%global version_rubygem_rack_test 2.2.0 %global version_rubygem_rackup 2.2.1 -%global version_rubygem_sinatra 4.0.0 -%global version_rubygem_tilt 2.4.0 +%global version_rubygem_sinatra 4.1.1 +%global version_rubygem_tilt 2.6.0 %global required_pacemaker_version 3.0.0 @@ -126,12 +126,9 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_vers # Patch1: name.patch Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch Patch2: show-info-page-instead-of-webui.patch -Patch3: RHEL-79033-fix-restarting-bundle-instances.patch -Patch4: RHEL-79090-fix-deletion-of-misconfigured-bundles.patch # ui patches: >200 # Patch201: name-web-ui.patch -Patch201: RHEL-78654-fix-filter-clones-by-agent-name-in-resource-tree.patch # git for patches @@ -160,6 +157,8 @@ BuildRequires: python3-wheel # gcc for compiling custom rubygems and python extensions BuildRequires: gcc BuildRequires: gcc-c++ +# for rubygem ffi +BuildRequires: libffi-devel # dependencies for pycurl BuildRequires: libcurl-devel BuildRequires: openssl-devel @@ -190,6 +189,8 @@ BuildRequires: pkgconfig # corosync and pacemaker need versions and it's not working in virtual provides BuildRequires: corosync-devel >= 3.0 BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version} +# Buildroot only package, provides pkgconfig of corosync-qdevice for autotools +BuildRequires: corosync-qdevice-devel BuildRequires: pkgconfig(booth) BuildRequires: pkgconfig(sbd) @@ -198,7 +199,6 @@ BuildRequires: libappstream-glib # python and libraries for pcs, setuptools for pcs entrypoint -Requires: python3 >= 3.12 Requires: python3-cryptography Requires: python3-dateutil >= 2.7.0 Requires: python3-lxml @@ -286,6 +286,9 @@ BuildRequires: nodejs-npm Requires: pcs = %{version}-%{release} Requires: cockpit-bridge +Provides: bundled(pcs-web-ui) = %{!?ui_tarball_version:%{ui_version}}%{?ui_tarball_version} + + %description pcs is a corosync and pacemaker configuration tool. It permits users to @@ -357,7 +360,6 @@ update_times_patch(){ %autopatch -p1 -m 201 # update_times_patch %%{PATCH201} -update_times_patch %{PATCH201} # patch pcs sources %autosetup -S git -n %{pcs_source_name} -N @@ -365,17 +367,15 @@ update_times_patch %{PATCH201} # update_times_patch %%{PATCH1} update_times_patch %{PATCH1} update_times_patch %{PATCH2} -update_times_patch %{PATCH3} -update_times_patch %{PATCH4} # generate .tarball-version if building from an untagged commit, not a released version # autogen uses git-version-gen which uses .tarball-version for generating version number -%if "%{clean_version}" != "%{version_or_commit}" - echo "%{clean_version}+$(echo "%{version_or_commit}" | head -c 8)" > %{_builddir}/%{pcs_source_name}/.tarball-version +%if 0%{?tarball_version:1} + echo %{tarball_version} > %{_builddir}/%{pcs_source_name}/.tarball-version %endif -%if "x%{?ui_branch_or_commit}" != "x" - echo "%{ui_version}+$(echo "%{ui_branch_or_commit}" | head -c 8)" > %{_builddir}/%{ui_src_name}/.tarball-version +%if 0%{?ui_tarball_version:1} + echo %{ui_tarball_version} > %{_builddir}/%{ui_src_name}/.tarball-version %endif # prepare dirs/files necessary for building python bundles @@ -657,6 +657,16 @@ run_all_tests %changelog +* Wed May 14 2025 Michal Pospíšil - 0.12.0-5 +- Rebased pcs to the latest sources (see CHANGELOG.md) + Resolves: RHEL-7681, RHEL-21050, RHEL-22423, RHEL-35407, RHEL-44347, RHEL-63186, RHEL-66607, RHEL-76176, RHEL-81938 +- Rebased HA Cluster Management add-on to the latest sources + Resolves: RHEL-30686, RHEL-30695, RHEL-30698, RHEL-79314, RHEL-84143, RHEL-85195 +- The upstream version of HA Cluster Management add-on can now be queried through RPM - see bundled(pcs-web-ui) + Resolves: RHEL-86227 +- Updated bundled rubygems: backports, childprocess, ffi, puma, rack, rack-protection, rack-session, rack-test, sinatra, tilt +- Updated bundled Python dependency dacite + * Fri Mar 14 2025 Guoguo - 0.12.0-4 - Add riscv64 diff --git a/show-info-page-instead-of-webui.patch b/show-info-page-instead-of-webui.patch index 65048ae..fe26ef2 100644 --- a/show-info-page-instead-of-webui.patch +++ b/show-info-page-instead-of-webui.patch @@ -1,7 +1,7 @@ -From 264b69c1eedae035bbb1bcf345403978ebe5a222 Mon Sep 17 00:00:00 2001 +From 9559e64881e664c95df93ef6e14036b019201a68 Mon Sep 17 00:00:00 2001 From: Ivan Devat Date: Tue, 5 Nov 2024 16:35:02 +0100 -Subject: [PATCH] show info page instead of webui +Subject: [PATCH 2/2] show info page instead of webui --- pcs/Makefile.am | 1 + @@ -13,10 +13,10 @@ Subject: [PATCH] show info page instead of webui create mode 100644 pcs/daemon/app/webui_info_handler.py diff --git a/pcs/Makefile.am b/pcs/Makefile.am -index 7a734dc1..45d5801f 100644 +index 1297473f..8d4b9307 100644 --- a/pcs/Makefile.am +++ b/pcs/Makefile.am -@@ -206,6 +206,7 @@ EXTRA_DIST = \ +@@ -219,6 +219,7 @@ EXTRA_DIST = \ daemon/app/webui/core.py \ daemon/app/webui/session.py \ daemon/app/webui/sinatra_ui.py \ @@ -62,18 +62,18 @@ index 00000000..3ab8275b + (r"/ui/.*", _WebuiInfoHandler, dict(path=path)), + ] diff --git a/pcs/daemon/run.py b/pcs/daemon/run.py -index e0090fc1..e80eecfe 100644 +index 558315c2..cfe9999f 100644 --- a/pcs/daemon/run.py +++ b/pcs/daemon/run.py -@@ -35,6 +35,7 @@ from pcs.daemon.app import capabilities as capabilities_app - from pcs.daemon.app import ( +@@ -33,6 +33,7 @@ from pcs.daemon.app import ( + auth, sinatra_remote, sinatra_ui, + webui_info_handler, ) + from pcs.daemon.app import capabilities as capabilities_app - try: -@@ -142,7 +143,8 @@ def configure_app( +@@ -168,7 +169,8 @@ def configure_app( # noqa: PLR0913 # Even with disabled (standalone) webui the following routes must be # provided because they can be used via unix socket from cockpit. routes.extend( @@ -144,5 +144,5 @@ index a120ed3d..ac0117c8 100644 -- -2.47.1 +2.49.0 diff --git a/sources b/sources index 8a5fc6c..1124384 100644 --- a/sources +++ b/sources @@ -1,21 +1,21 @@ -SHA512 (dacite-1.8.1.tar.gz) = 4b40c0bdcf5490bcc77de9e7f04b7267642bcfd41e4168607a5457f38abe3ad4b3041d8a23cb43af76de14eabee45f900ad5ddf7af8f70a2be4850bccc2d3af1 SHA512 (ethon-0.16.0.gem) = 3b31affcee0d5a5be05b5497d4a8d13515f8393f54579a3a9c8de49f78d3f065bb92659434b023f0a8bf8e0cccfbc94b617695b93c4d3f744cccd1eff2e68905 SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a SHA512 (pycurl-7.45.3.tar.gz) = 12a55070602a1fd22b160ad582a4001bdd28531d2b2ccd365ff0136bc13dd23af80b19488bdbbc60a902a3a362b64383b9ae6acce6ed328c74dcffc8a6a3f4ad -SHA512 (rack-test-2.1.0.gem) = e349ce61c3d787e0a772980db697e92212d4d9592ce33f55516d1f85fba55cbe666496c76392679b057786d6dab603d74b83e7bb773ab54940343e36dbf05d6f -SHA512 (backports-3.25.0.gem) = 47a2ffb83030cb317e85a4f72a1c4a76a90324b8928ac73e1aa3404a22136661e9ce718bfdd937fbe07b9e05a338fcbd717bb505fb1dd91cfee570bbff9e3f72 SHA512 (base64-0.2.0.gem) = ee5cdc30e73e625c15cb674cdd16a839ad44ffb0a27d1363f94491b48d95da37a2976c34f6f616b722a35750a067eb2245c4746d7d36f8e9a9ecee68ff5540fb -SHA512 (childprocess-5.0.0.gem) = 9ec340c86f4fd978b7a9925bcf90811ff3443f014469e4ff121e2c4758a4068823029ab413d1a57eb9de4a864435505b1edfa60a611709f2a5f99aaf08da422d -SHA512 (rack-protection-4.0.0.gem) = 5eb33e4829e5e0d320a14d169fd007111641e388f2b6e5f8de98d45dfd1e6705cdb4e1ce29524ebb6fb5afe14079b8e5370c9c389cb2befca4ca508da73165b3 -SHA512 (rack-session-2.0.0.gem) = 827cd1acf20eb814adda7663f61755febd2e6acec6ee085dbc393b614a621f845dffa8f759e434055dbf029be370afeb921c8759c9e9e1fee17119830d9b2899 -SHA512 (sinatra-4.0.0.gem) = 1eb8c6e8966461d3fa463b5c87e8bc3cd58243fc997a104671e252b866bb653dfc16d7b9f677e016ae91cb30998d72f8778eb2b2254ce27cf304944a6bfa8c05 -SHA512 (ffi-1.17.0.gem) = 5cdaf19eaa499127607de7389f69b4927c7bd8a154a53071c53906050bc712b67c1fbc7b4b37fcf9a82fa6c79d705796032cd7ab61755646cfed0c2d279940a1 SHA512 (mustermann-3.0.3.gem) = d205985a5da83d83248899642ed359056b0cdb511e77d51309319c2f8d8b6c84040e9e1d3a56b7f83a0b26aed4b344f4df371b310e419c20170f0a486e89ba6f SHA512 (nio4r-2.7.4.gem) = 6c8280484066ffc39e98b99dfaf5a69fe2a28cafb380924f448673fda8b69b5d97f8b75b8345b91d92f6186f0664e09bec8e1c7c19c070219b030f554824d2ac -SHA512 (puma-6.4.3.gem) = e8baf137c5164f11b8563561405fc4218210707bfb15d0f21118d4be0fd0d071050c46357337a9c6fdda7ce230f3ae09ebfe9976f0a7a0243824bda7871d7a18 SHA512 (rackup-2.2.1.gem) = e63c4dee6f1a677d507df0ae7bcebec88673e7a0a8d6621997949045db60801907038a148a0608f6e62864cb2ac056fca382f3438dc227b0fa7a3be52d56ea66 -SHA512 (tilt-2.4.0.gem) = 8cf5036017f501da8843340a9c574ee647074782dcb27ee0aa906fb96ad1e66b90dfb80159aa4c5e7605490058c5ae478bd0fe09f17ae50a2697327d02c814cc -SHA512 (pcs-web-ui-0.1.22.tar.gz) = cb97ffba625326ab3857b9c22b4400907177a5ea88769ae611cc9315758c1ceca7e16a1b92d43fc594911fcde6003d3beadb388c6bdd5c1bcc67d699c49c9b2c -SHA512 (pcs-web-ui-node-modules-0.1.22.tar.xz) = b1db7d8c04e942baf8a99f115cbda31a84f562c7deeee5f1371e5ddf5fb5e73ce084ede1f0da7083b2d0114228f58006599f1b9a29dd3a5202b3119e41f74d69 -SHA512 (pcs-0.12.0.tar.gz) = f9b93bd39ce18898aa3bab7d4da86535e7351b75f15a0bc333598e2dae03ebf0f0f0638b1b441533af7f32909902353c3cf3ed5a219d0ce3b67a3a0e2c63b194 -SHA512 (rack-3.1.10.gem) = 2da18867543b7c536e152cbb48a1680473b9b53c405f71c51c3263ae7d40435dfcc66b99caee0e14d901affa36bfcedb6fa5defe9ecbd2ce82687f71f8d2ef43 +SHA512 (backports-3.25.1.gem) = a69f9b38d5f2b868a0823c3e2750b01e0d1a5c8b52c5e49a04de13fd0fd7262e881768f583c6545c4257bb12a20d6531d0a5132173ee629ee7464db2421dbbc4 +SHA512 (childprocess-5.1.0.gem) = 487ee82e6e7cc1e81ed6740e3eb54e12e9d1065de92eda71f48039e377db8a827c647ce6c9314157ece577be52519bbe014aadcda4a7a748589fad7dbf19ae3a +SHA512 (ffi-1.17.2.gem) = 61fd30c546d9d4a695dd3954eba205cd6ddf36f2c67eb2f823591a6ece540d2d11fcc792704218d969d21bf7111e36bc54f40e5d9eeb1be4fdb06274a17bec13 +SHA512 (puma-6.6.0.gem) = 3f6563fe0520249c8be911a726b1a1a02941c4336491b46716b132a0b5723f0ca4b2df16f1c9c2f2919e9343df929d1e2f620c3adab589c7013fe87fa41560fb +SHA512 (rack-3.1.14.gem) = eeff677686d6d5c3a1099a43d91b20da78ca82d3733af6c2a130afeea6ef238bf880e652003ef27eb24c9998db854e2504816efef51177d3ebede6fe8b0c3bd3 +SHA512 (rack-protection-4.1.1.gem) = 0f5fd96d93eab654a7333fe75772b460e91b129da143df420f84ac259f2e24e3b1cf5a1892c1edd2dee3a2ed456cd025ae49dc961c7122a1852de3f15f77d1b1 +SHA512 (rack-session-2.1.1.gem) = 2cb385879a6d5e67056303daee861e1a45d75571bf68a5339f9c23ba512aa29f4cc1473d60de6f8ed7c0a0ea2932ad83657e54686725346783a135352ce7a03c +SHA512 (rack-test-2.2.0.gem) = 9c758151d89d86f04a92ba20c43221c4346b8d23f62accb955e759f85910c0e179a5c2e1ff74f131f337afd6b6ae72c36f5d53f600649480769a29468e14f44a +SHA512 (sinatra-4.1.1.gem) = bf6c75a2f5e38cfb8442f481c491efb132dbf37a114e8ee35a4d24dd6f3b882f967a3c542cbafdcaf96242b39f5d78b77271adc562a2ee002b8790a73c99a7e9 +SHA512 (dacite-1.9.2.tar.gz) = 69513bc1acd43e45a208ce4b4186072f92d9057a6a88c77d56f21405fbed7964d94fe4f6a37c99754a793caa2bd0584664dfab69169ef0d3564bb09d37769e59 +SHA512 (pcs-71bb3c8e22436db810c7c7ec1675d49e0062b2ee.tar.gz) = 3f7440b560e2f1236fe790aed46e8dc6d8cd90df4b5b338e1674793ff86142e8953ebde837d2615451d36c10d11072e77343ff83ade7703086326f8bcd52268c +SHA512 (pcs-web-ui-54730df523389a3c87abad7e47c44e30b33a2647.tar.gz) = a7f367f0198b668f50a2b3b4797b694c7258b921a5a100fdd5b7187ab1cdfa64381165102a9b621145350fef38e130fec000029a6d8ed41a0a2f997b13e41783 +SHA512 (pcs-web-ui-node-modules-0.1.22+62-5473.tar.xz) = a1ef7ff16190597e061ee670064ba6056fa2ee5f67bbcc7b03ed462bae615052fbc52649c33dedc9fe532e2709c5b5c6cd6e1cfeda3acca3d3e244156c8364de +SHA512 (tilt-2.6.0.gem) = 96aad6e3dfa542d0f11a4c96faa99c724723fe10029dae58f9662f9ef07198cf4d3ffea56899b7f88d8738a01effade00591318900364798fad9a41cd95397b2