From 2f6cedfd0c0b31be59b2b69daafdc83dc46c2252 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 15 Sep 2025 12:30:50 +0000 Subject: [PATCH] import CS pcs-0.11.10-1.el9 --- .gitignore | 29 +- .pcs.metadata | 29 +- ...lones-by-agent-name-in-resource-tree.patch | 82 ----- ...9055-fix-restarting-bundle-instances.patch | 154 ---------- ...ix-deletion-of-misconfigured-bundles.patch | 280 ------------------ ...t-cluster-setup-with-udp-u-transport.patch | 10 +- SPECS/pcs.spec | 130 +++++--- 7 files changed, 122 insertions(+), 592 deletions(-) delete mode 100644 SOURCES/RHEL-78653-fix-filter-clones-by-agent-name-in-resource-tree.patch delete mode 100644 SOURCES/RHEL-79055-fix-restarting-bundle-instances.patch delete mode 100644 SOURCES/RHEL-79160-fix-deletion-of-misconfigured-bundles.patch diff --git a/.gitignore b/.gitignore index 3c71f98..0980e05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,22 @@ -SOURCES/backports-3.25.0.gem +SOURCES/backports-3.25.1.gem SOURCES/base64-0.2.0.gem -SOURCES/childprocess-5.0.0.gem -SOURCES/dacite-1.8.1.tar.gz +SOURCES/childprocess-5.1.0.gem +SOURCES/dacite-1.9.2.tar.gz SOURCES/ethon-0.16.0.gem -SOURCES/ffi-1.17.0.gem +SOURCES/ffi-1.17.2.gem +SOURCES/logger-1.7.0.gem SOURCES/mustermann-3.0.3.gem SOURCES/nio4r-2.7.4.gem -SOURCES/pcs-0.11.9.tar.gz -SOURCES/pcs-web-ui-0.1.22.tar.gz -SOURCES/pcs-web-ui-node-modules-0.1.22.tar.xz -SOURCES/puma-6.4.3.gem +SOURCES/pcs-0.11.10.tar.gz +SOURCES/pcs-web-ui-0.1.23.tar.gz +SOURCES/pcs-web-ui-node-modules-0.1.23.tar.xz +SOURCES/puma-6.6.0.gem SOURCES/pyagentx-0.4.pcs.2.tar.gz -SOURCES/rack-3.1.10.gem -SOURCES/rack-protection-4.0.0.gem -SOURCES/rack-session-2.0.0.gem -SOURCES/rack-test-2.1.0.gem +SOURCES/rack-3.1.16.gem +SOURCES/rack-protection-4.1.1.gem +SOURCES/rack-session-2.1.1.gem +SOURCES/rack-test-2.2.0.gem SOURCES/rackup-2.2.1.gem SOURCES/ruby2_keywords-0.0.5.gem -SOURCES/sinatra-4.0.0.gem -SOURCES/tilt-2.4.0.gem +SOURCES/sinatra-4.1.1.gem +SOURCES/tilt-2.6.0.gem diff --git a/.pcs.metadata b/.pcs.metadata index 46318eb..1b2e51c 100644 --- a/.pcs.metadata +++ b/.pcs.metadata @@ -1,21 +1,22 @@ -7bfaf5b42c0992bbc5055d7bd4013f0ca4731775 SOURCES/backports-3.25.0.gem +5a346174c2d09489759fe47f73d7e072753a127c SOURCES/backports-3.25.1.gem ea3a591bdfa93655d8eec9d7bdd7fb87ecb5616a SOURCES/base64-0.2.0.gem -8f910640f84d085707138aa70d6eedb7df10ca73 SOURCES/childprocess-5.0.0.gem -07b26abbf7ff0dcba5c7f9e814ff7eebafefb058 SOURCES/dacite-1.8.1.tar.gz +963b12b359251f41998eebe6f6adfec92fe6f49f SOURCES/childprocess-5.1.0.gem +01690d9883c149890e04dce4db43ec305959aa39 SOURCES/dacite-1.9.2.tar.gz 5b56a68268708c474bef04550639ded3add5e946 SOURCES/ethon-0.16.0.gem -8edfdd7cc314b5dc84851ea05b6fceedadf386a1 SOURCES/ffi-1.17.0.gem +01747fce469e932b701cb7a35d1ef4b3c68eb170 SOURCES/ffi-1.17.2.gem +abfa641d98ab2e71bc8102b0aab2f466569668d2 SOURCES/logger-1.7.0.gem 249a573022dde130372f0ebbeaf2430f36c2b664 SOURCES/mustermann-3.0.3.gem 34b5b1cb50f18d6ec6c5d5cbcb823e7f81f54290 SOURCES/nio4r-2.7.4.gem -9cee532ac692420c0dbb09e22efaeb2f8ec1d4ed SOURCES/pcs-0.11.9.tar.gz -b19baebde3b478071597b5579a36d5a6e9064790 SOURCES/pcs-web-ui-0.1.22.tar.gz -29c9677893485e6ad75862092fc9eedd6f0ad9e9 SOURCES/pcs-web-ui-node-modules-0.1.22.tar.xz -f72357acbdcfd68b4b41a999ed47926c0e54ea5e SOURCES/puma-6.4.3.gem +75ffdc7ecaad560d26ce453cbc6d05ec755dbdcc SOURCES/pcs-0.11.10.tar.gz +6ce5e06811ffcaa492fce44383e1576219812096 SOURCES/pcs-web-ui-0.1.23.tar.gz +ada7c4bba63a59195aee0780256773ebc2370d2e SOURCES/pcs-web-ui-node-modules-0.1.23.tar.xz +0b7e5a3f71fc28d19e4758a44ffe07d20eff1e8e SOURCES/puma-6.6.0.gem 3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz -0d5ab43a8cbab21249803ff49a7caae4e271131c SOURCES/rack-3.1.10.gem -f91158b296882aa5b3798ff6c24f01cdf233ef48 SOURCES/rack-protection-4.0.0.gem -9e7935696af0b64cc5f5ce2dfeabdb7e0d3a84f0 SOURCES/rack-session-2.0.0.gem -ae09ea83748b55875edc3708fffba90db180cb8e SOURCES/rack-test-2.1.0.gem +85933f70100a1c7a2b226aec518dce8e4fe0c6d6 SOURCES/rack-3.1.16.gem +2d54ab33eeefdca80b76fc3b749add669182877d SOURCES/rack-protection-4.1.1.gem +654168c0755ffe10443dd066276d4661bafdb2a4 SOURCES/rack-session-2.1.1.gem +922c597f0503f97dc3a058fe997590b108bc429a SOURCES/rack-test-2.2.0.gem efa414fe946ccc1f70e64337d206e98807baa717 SOURCES/rackup-2.2.1.gem d017b9e4d1978e0b3ccc3e2a31493809e4693cd3 SOURCES/ruby2_keywords-0.0.5.gem -28c671c6d061475ed2bfd3e6a4a17970a0a12d8a SOURCES/sinatra-4.0.0.gem -ad6225a8c3b4b66f88ae878d76ef6dec1d0c2f9e SOURCES/tilt-2.4.0.gem +805ac713697fa096402b55497aa72f0e81be4a4c SOURCES/sinatra-4.1.1.gem +a646616f117285087d4a8df99d53cf8b01c5405e SOURCES/tilt-2.6.0.gem diff --git a/SOURCES/RHEL-78653-fix-filter-clones-by-agent-name-in-resource-tree.patch b/SOURCES/RHEL-78653-fix-filter-clones-by-agent-name-in-resource-tree.patch deleted file mode 100644 index 2ddaf01..0000000 --- a/SOURCES/RHEL-78653-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/SOURCES/RHEL-79055-fix-restarting-bundle-instances.patch b/SOURCES/RHEL-79055-fix-restarting-bundle-instances.patch deleted file mode 100644 index 604324f..0000000 --- a/SOURCES/RHEL-79055-fix-restarting-bundle-instances.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 618dbcf1f7be271f63f399befdde93ced6448a52 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 ccffba735128ea4be62aa33e7319114d8b26a8b0 ---- - pcs/lib/commands/resource.py | 85 ++++++++++--------- - .../lib/commands/resource/test_restart.py | 16 +--- - 2 files changed, 46 insertions(+), 55 deletions(-) - -diff --git a/pcs/lib/commands/resource.py b/pcs/lib/commands/resource.py -index 719f8acd3..945e40759 100644 ---- a/pcs/lib/commands/resource.py -+++ b/pcs/lib/commands/resource.py -@@ -2566,56 +2566,59 @@ 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"] -- ) -- ) -- ) -- 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, -+ 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() -+ 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( -@@ -2627,7 +2630,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 9d61f5704..af5004b43 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/SOURCES/RHEL-79160-fix-deletion-of-misconfigured-bundles.patch b/SOURCES/RHEL-79160-fix-deletion-of-misconfigured-bundles.patch deleted file mode 100644 index 8f0fd69..0000000 --- a/SOURCES/RHEL-79160-fix-deletion-of-misconfigured-bundles.patch +++ /dev/null @@ -1,280 +0,0 @@ -From 196be7e21aeb9e1a656e94136f7f15139c56b6e1 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 3f0e669b5..bcee00cd7 100644 ---- a/pcs/common/reports/codes.py -+++ b/pcs/common/reports/codes.py -@@ -176,6 +176,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 0809c91d1..bfa4e9750 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, -@@ -6442,6 +6443,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 093218dac..04fbe5bf2 100644 ---- a/pcs/lib/cib/remove_elements.py -+++ b/pcs/lib/cib/remove_elements.py -@@ -259,17 +259,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( -@@ -318,20 +328,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 e9f47786d..305644449 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 -@@ -6075,3 +6076,25 @@ class GuestNodeRemovalIncomplete(NameBuildTest): - ), - reports.GuestNodeRemovalIncomplete("guest-node"), - ) -+ -+ -+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 7c72fd047..a6d68ae36 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 -@@ -991,3 +992,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/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch b/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch index c31e908..03a221f 100644 --- a/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch +++ b/SOURCES/do-not-support-cluster-setup-with-udp-u-transport.patch @@ -1,4 +1,4 @@ -From 071b189a3a72610361f8d31d2ebbb0b9083c872f Mon Sep 17 00:00:00 2001 +From cfb2014ad5b360c51d89ea318f0f9ddb2825b4a3 Mon Sep 17 00:00:00 2001 From: Ivan Devat 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 63c40b78..f69a75b8 100644 +index 14c1674a..ee71bb03 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 +22,10 @@ index 63c40b78..f69a75b8 100644 .br Transport options are: ip_version, netmtu diff --git a/pcs/usage.py b/pcs/usage.py -index a4af30d4..7c7fc7ea 100644 +index 102deceb..4d63192d 100644 --- a/pcs/usage.py +++ b/pcs/usage.py -@@ -1490,6 +1490,7 @@ Commands: +@@ -1498,6 +1498,7 @@ Commands: hash=sha256. To disable encryption, set cipher=none and hash=none. Transports udp and udpu: @@ -34,5 +34,5 @@ index a4af30d4..7c7fc7ea 100644 support traffic encryption nor compression. Transport options are: -- -2.45.2 +2.50.0 diff --git a/SPECS/pcs.spec b/SPECS/pcs.spec index 9d5daa1..6e243cc 100644 --- a/SPECS/pcs.spec +++ b/SPECS/pcs.spec @@ -1,6 +1,6 @@ Name: pcs -Version: 0.11.9 -Release: 2%{?dist} +Version: 0.11.10 +Release: 1%{?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 @@ -19,50 +19,54 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64 # 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 73c3ba7aec1e2abf2ef7c3d0ffddeeef7c7516d0 +# %%global branch_or_commit dbb53b89e16735d4edf85248d02024bb6de53a55 + +%global version_or_commit %{version} %if 0%{?branch_or_commit:1} %global version_or_commit %{branch_or_commit} -%else - %global version_or_commit %{version} + %global tarball_version %{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_version 0.1.23 # 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_modules_version 0.1.23 + +%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 pcs_snmp_pkg_name pcs-snmp %global pyagentx_version 0.4.pcs.2 -%global dacite_version 1.8.1 -%global version_rubygem_backports 3.25.0 +%global dacite_version 1.9.2 +%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_logger 1.7.0 %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.16 +%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_ruby2_keywords 0.0.5 -%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 2.1.0 +%global min_compatible_pacemaker_version 2.1.0 +%global first_incompatible_pacemaker_version 3.0.0 %global pcs_bundled_dir pcs_bundled %global pcsd_public_dir pcsd/public @@ -103,6 +107,7 @@ Source93: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_ Source94: https://rubygems.org/downloads/base64-%{version_rubygem_base64}.gem Source95: https://rubygems.org/downloads/rack-session-%{version_rubygem_rack_session}.gem Source96: https://rubygems.org/downloads/rackup-%{version_rubygem_rackup}.gem +Source97: https://rubygems.org/downloads/logger-%{version_rubygem_logger}.gem Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_version_or_commit}/%{ui_src_name}.tar.gz Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_version_or_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz @@ -110,12 +115,9 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_vers # pcs patches: <= 200 # Patch1: bzNUMBER-01-name.patch Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch -Patch2: RHEL-79055-fix-restarting-bundle-instances.patch -Patch3: RHEL-79160-fix-deletion-of-misconfigured-bundles.patch # ui patches: >200 # Patch201: bzNUMBER-01-name.patch -Patch201: RHEL-78653-fix-filter-clones-by-agent-name-in-resource-tree.patch # git for patches @@ -125,7 +127,6 @@ BuildRequires: coreutils # find is used in Makefile and also somewhere else BuildRequires: findutils # python for pcs -BuildRequires: python3 >= 3.9 BuildRequires: python3-cryptography BuildRequires: python3-dateutil >= 2.7.0 BuildRequires: python3-devel @@ -133,7 +134,6 @@ BuildRequires: python3-setuptools BuildRequires: python3-pycurl BuildRequires: python3-pip BuildRequires: python3-pyparsing -BuildRequires: python3-cryptography BuildRequires: python3-lxml # for building bundled python packages BuildRequires: python3-wheel @@ -143,6 +143,8 @@ BuildRequires: python3-tornado # gcc for compiling custom rubygems BuildRequires: gcc BuildRequires: gcc-c++ +# for rubygem ffi +BuildRequires: libffi-devel # ruby and gems for pcsd BuildRequires: ruby >= 2.5 BuildRequires: ruby-devel @@ -167,8 +169,10 @@ BuildRequires: npm # cluster stack packages for pkg-config BuildRequires: booth BuildRequires: corosynclib-devel >= 3.0 +# Buildroot only package, provides pkgconfig of corosync-qdevice for autotools +BuildRequires: corosync-qdevice-devel BuildRequires: fence-agents-common -BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version} +BuildRequires: pacemaker-libs-devel >= %{min_compatible_pacemaker_version}, pacemaker-libs-devel < %{first_incompatible_pacemaker_version} BuildRequires: resource-agents BuildRequires: sbd # for working with qdevice certificates (certutil) - used in configure.ac @@ -195,12 +199,12 @@ Requires: rubygem-rexml # for killall Requires: psmisc # cluster stack and related packages -Requires: pcmk-cluster-manager >= %{required_pacemaker_version} -Suggests: pacemaker >= %{required_pacemaker_version} +Requires: pcmk-cluster-manager >= %{min_compatible_pacemaker_version}, pcmk-cluster-manager < %{first_incompatible_pacemaker_version} +Suggests: pacemaker >= %{min_compatible_pacemaker_version}, pacemaker < %{first_incompatible_pacemaker_version} Requires: (corosync >= 3.0 if pacemaker) # pcs enables corosync encryption by default so we require libknet1-plugins-all Requires: (libknet1-plugins-all if corosync) -Requires: pacemaker-cli >= %{required_pacemaker_version} +Requires: pacemaker-cli >= %{min_compatible_pacemaker_version}, pacemaker-cli < %{first_incompatible_pacemaker_version} # for post, preun and postun macros Requires(post): systemd Requires(preun): systemd @@ -221,6 +225,7 @@ Provides: bundled(base64) = %{version_rubygem_base64} Provides: bundled(childprocess) = %{version_rubygem_childprocess} Provides: bundled(ethon) = %{version_rubygem_ethon} Provides: bundled(ffi) = %{version_rubygem_ffi} +Provides: bundled(logger) = %{version_rubygem_logger} Provides: bundled(mustermann) = %{version_rubygem_mustermann} Provides: bundled(nio4r) = %{version_rubygem_nio4r} Provides: bundled(puma) = %{version_rubygem_puma} @@ -233,6 +238,9 @@ Provides: bundled(ruby2_keywords) = %{version_rubygem_ruby2_keywords} Provides: bundled(sinatra) = %{version_rubygem_sinatra} Provides: bundled(tilt) = %{version_rubygem_tilt} +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 easily view, modify and create pacemaker based clusters. @@ -314,28 +322,24 @@ update_times_patch(){ # 3. then unpack node_modules into sources tree (-a 1). %autosetup -T -b 100 -a 101 -N -n %{ui_src_name} %autopatch -p1 -m 201 - - # update_times_patch %%{PATCH201} -update_times_patch %{PATCH201} # patch pcs sources %autosetup -S git -n %{pcs_source_name} -N %autopatch -p1 -M 200 # update_times_patch %%{PATCH1} update_times_patch %{PATCH1} -update_times_patch %{PATCH2} -update_times_patch %{PATCH3} + # 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 "%{version}" != "%{version_or_commit}" - echo "%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 all bundles @@ -359,6 +363,7 @@ cp -f %SOURCE93 %{rubygem_cache_dir} cp -f %SOURCE94 %{rubygem_cache_dir} cp -f %SOURCE95 %{rubygem_cache_dir} cp -f %SOURCE96 %{rubygem_cache_dir} +cp -f %SOURCE97 %{rubygem_cache_dir} # 2) prepare python bundles @@ -398,6 +403,15 @@ cd ../%{ui_src_name} mkdir -p %{buildroot}%{_libdir}/%{pcsd_public_dir}/ui/static/media ln -fs /etc/favicon.png %{buildroot}%{_libdir}/%{pcsd_public_dir}/ui/static/media/favicon.png +# prepare pcs-web-ui files (not needed for pcs as pcs installs them in Makefile) +mkdir -p %{buildroot}/%{_defaultlicensedir}/%{name} +mv COPYING %{buildroot}/%{_defaultlicensedir}/%{name}/COPYING_WUI.md + +mkdir -p %{buildroot}/%{_docdir}/%{name} +mv CHANGELOG.md %{buildroot}/%{_docdir}/%{name}/CHANGELOG_WUI.md +mv README.md %{buildroot}/%{_docdir}/%{name}/README_WUI.md + + # Install pcs cd ../%{pcs_source_name} %make_install @@ -414,6 +428,8 @@ mv %{rubygem_bundle_dir}/gems/ethon-%{version_rubygem_ethon}/LICENSE ethon_LICEN mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/COPYING ffi_COPYING mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE ffi_LICENSE mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE.SPECS ffi_LICENSE.SPECS +mv %{rubygem_bundle_dir}/gems/logger-%{version_rubygem_logger}/BSDL logger_BSDL +mv %{rubygem_bundle_dir}/gems/logger-%{version_rubygem_logger}/COPYING logger_COPYING mv %{rubygem_bundle_dir}/gems/mustermann-%{version_rubygem_mustermann}/LICENSE mustermann_LICENSE mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/license.md nio4r_license.md mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/ext/libev/LICENSE nio4r_libev_LICENSE @@ -537,9 +553,12 @@ run_all_tests %files %doc CHANGELOG.md %doc README.md +%doc %{_docdir}/%{name}/CHANGELOG_WUI.md +%doc %{_docdir}/%{name}/README_WUI.md %doc dacite_README.md %license dacite_LICENSE %license COPYING +%license %{_defaultlicensedir}/%{name}/COPYING_WUI.md # rubygem licenses %license backports_LICENSE.txt %license base64_LICENSE.txt @@ -548,6 +567,8 @@ run_all_tests %license ffi_COPYING %license ffi_LICENSE %license ffi_LICENSE.SPECS +%license logger_BSDL +%license logger_COPYING %license mustermann_LICENSE %license nio4r_license.md %license nio4r_libev_LICENSE @@ -569,9 +590,9 @@ run_all_tests %{_unitdir}/pcsd.service %{_unitdir}/pcsd-ruby.service %{_datadir}/bash-completion/completions/pcs -%{_sharedstatedir}/pcsd +%ghost %attr(0700,root,root) %{_sharedstatedir}/pcsd +%ghost %attr(0700,root,root) %{_var}/log/pcsd %config(noreplace) %{_sysconfdir}/pam.d/pcsd -%dir %{_var}/log/pcsd %config(noreplace) %{_sysconfdir}/logrotate.d/pcsd %config(noreplace) %{_sysconfdir}/sysconfig/pcsd %ghost %config(noreplace) %attr(0600,root,root) %{_sharedstatedir}/pcsd/cfgsync_ctl @@ -580,7 +601,7 @@ run_all_tests %ghost %config(noreplace) %attr(0600,root,root) %{_sharedstatedir}/pcsd/pcsd.crt %ghost %config(noreplace) %attr(0600,root,root) %{_sharedstatedir}/pcsd/pcsd.key %ghost %config(noreplace) %attr(0644,root,root) %{_sharedstatedir}/pcsd/pcs_settings.conf -%ghost %config(noreplace) %attr(0644,root,root) %{_sharedstatedir}/pcsd/pcs_users.conf +%ghost %config(noreplace) %attr(0600,root,root) %{_sharedstatedir}/pcsd/pcs_users.conf %{_mandir}/man8/pcs.* %{_mandir}/man8/pcsd.* %exclude %{_libdir}/pcs/pcs_snmp_agent @@ -600,7 +621,30 @@ run_all_tests %license COPYING %license pyagentx_LICENSE.txt + %changelog +* Wed Jul 9 2025 Michal Pospisil - 0.11.10-1 +- Rebased pcs to the latest sources (see CHANGELOG.md) + Resolves: RHEL-77194, RHEL-92044 +- Updated pcs-web-ui to 0.1.23 (see CHANGELOG_WUI.md) + Resolves: RHEL-76309, RHEL-99805 +- There is now a changelog for the pcsd web UI + Resolves: RHEL-86233 +- Fixed directory permissions for RHEL Image Mode + Resolves: RHEL-97220 +- Updated bundled rubygem rack + +* Wed May 14 2025 Michal Pospisil - 0.11.9-3 +- Rebased pcs to the latest sources (see CHANGELOG.md) + Resolves: RHEL-35420, RHEL-76055, RHEL-76059, RHEL-76060, RHEL-76153, RHEL-76154, RHEL-76170, RHEL-76177, RHEL-82894 +- Rebased pcs-web-ui to the latest sources + Resolves: RHEL-76310, RHEL-76311, RHEL-76312, RHEL-79317, RHEL-85196, RHEL-85197, RHEL-85745 +- The upstream version of pcs-web-ui can now be queried through RPM - see bundled(pcs-web-ui) + Resolves: RHEL-86229 +- Updated bundled rubygems: backports, childprocess, ffi, puma, rack, rack-protection, rack-session, rack-test, sinatra, tilt + Resolves: RHEL-90151 +- Bundled rubygem logger + * Fri Feb 14 2025 Michal Pospisil - 0.11.9-2 - Fixed restarting bundles Resolves: RHEL-79055