diff --git a/backport-add-overwrite-to-pcs-cluster-report-documentation.patch b/backport-add-overwrite-to-pcs-cluster-report-documentation.patch new file mode 100644 index 0000000000000000000000000000000000000000..23bca564198d4a749287b7819d93f2fbfa3240be --- /dev/null +++ b/backport-add-overwrite-to-pcs-cluster-report-documentation.patch @@ -0,0 +1,46 @@ +From af6413bcf626d37028788e18366386fc6c873982 Mon Sep 17 00:00:00 2001 +From: Tomas Jelinek +Date: Thu, 26 Sep 2024 16:14:13 +0200 +Subject: [PATCH 049/100] add overwrite to pcs cluster report documentation + +--- + pcs/pcs.8.in | 4 ++-- + pcs/usage.py | 6 ++++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in +index 91974e9b..ab00f5bd 100644 +--- a/pcs/pcs.8.in ++++ b/pcs/pcs.8.in +@@ -695,8 +695,8 @@ Permanently destroy the cluster on the current node, killing all cluster process + verify [\fB\-\-full\fR] [\fB\-f\fR ] + Checks the pacemaker configuration (CIB) for syntax and common conceptual errors. If no filename is specified the check is performed on the currently running cluster. If \fB\-\-full\fR is used more verbose output will be printed. + .TP +-report [\fB\-\-from\fR "YYYY\-M\-D H:M:S" [\fB\-\-to\fR "YYYY\-M\-D H:M:S"]] +-Create a tarball containing everything needed when reporting cluster problems. If \fB\-\-from\fR and \fB\-\-to\fR are not used, the report will include the past 24 hours. ++report [\fB\-\-from\fR "YYYY\-M\-D H:M:S" [\fB\-\-to\fR "YYYY\-M\-D H:M:S"]] [\fB\-\-overwrite]\fR ++Create a tarball containing everything needed when reporting cluster problems. If \fB\-\-from\fR and \fB\-\-to\fR are not used, the report will include the past 24 hours. No existing files will be overwritten, unless \fB\-\-overwrite\fR is specified. + .SS "stonith" + .TP + [status [] [node=] [\fB\-\-hide\-inactive\fR]] +diff --git a/pcs/usage.py b/pcs/usage.py +index d0b14d11..20677eca 100644 +--- a/pcs/usage.py ++++ b/pcs/usage.py +@@ -1870,9 +1870,11 @@ Commands: + will be printed. + + report [--from "YYYY-M-D H:M:S" [--to "YYYY-M-D H:M:S"]] ++ [--overwrite] + Create a tarball containing everything needed when reporting cluster +- problems. If --from and --to are not used, the report will include +- the past 24 hours. ++ problems. If --from and --to are not used, the report will include ++ the past 24 hours. No existing files will be overwritten, unless ++ --overwrite is specified. + """.format( + config_show_syntax=_format_syntax(_CLUSTER_CONFIG_SHOW_SYNTAX), + config_show_desc=_format_desc(_CLUSTER_CONFIG_SHOW_DESC), +-- +2.25.1 + diff --git a/backport-make-url-remove_resource-usable-for-stonith-again.patch b/backport-make-url-remove_resource-usable-for-stonith-again.patch new file mode 100644 index 0000000000000000000000000000000000000000..ded11ac07aed7abaff005bc396f047ad225e11d0 --- /dev/null +++ b/backport-make-url-remove_resource-usable-for-stonith-again.patch @@ -0,0 +1,54 @@ +From a1bae66aba35a6155e3c22524abb40c7923ca4ca Mon Sep 17 00:00:00 2001 +From: Ivan Devat +Date: Tue, 27 Aug 2024 16:56:21 +0200 +Subject: [PATCH 048/100] make url /remove_resource usable for stonith again + +The internal separation of resources and stonith caused that the url +`/managec/cluster-name/remove_resource` is refusing to work with +stonith (the handler calls CLI commands that now refuses to work with +stonith). Because there is no alternative for this task, the handler is +fixed to accept stonith but only with explicit `is-stonith` parameter. +--- + pcsd/remote.rb | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/pcsd/remote.rb b/pcsd/remote.rb +index 93212321..5ade6ec5 100644 +--- a/pcsd/remote.rb ++++ b/pcsd/remote.rb +@@ -1018,6 +1018,13 @@ def remove_resource(params, request, auth_user) + end + } + tmp_file = nil ++ ++ resource_or_stonith = if params["is-stonith"] == "true" then ++ "stonith" ++ else ++ "resource" ++ end ++ + if force + resource_to_remove = resource_list + else +@@ -1027,7 +1034,8 @@ def remove_resource(params, request, auth_user) + if retval != 0 + return [400, 'Unable to stop resource(s).'] + end +- cmd = [PCS, '-f', tmp_file.path, '--', 'resource', 'disable'] ++ ++ cmd = [PCS, '-f', tmp_file.path, '--', resource_or_stonith, 'disable'] + resource_list.each { |resource| + out, err, retval = run_cmd(user, *(cmd + [resource])) + if retval != 0 +@@ -1061,7 +1069,7 @@ def remove_resource(params, request, auth_user) + end + end + resource_to_remove.each { |resource| +- cmd = ['resource', 'delete', resource] ++ cmd = [resource_or_stonith, 'delete', resource] + flags = [] + if force + flags << '--force' +-- +2.25.1 + diff --git a/pcs.spec b/pcs.spec index da2f7d782483d75b3b4dbf8c9e3ce27793cd5884..c610ed06b823c956770740d4bcd9ae5a539c334b 100644 --- a/pcs.spec +++ b/pcs.spec @@ -1,6 +1,6 @@ Name: pcs Version: 0.11.8 -Release: 1 +Release: 2 License: GPL-2.0-only AND Apache-2.0 AND MIT AND BSD-3-Clause AND (BSD-2-Clause OR Ruby) AND (BSD-2-Clause OR GPL-2.0-or-later) URL: https://github.com/ClusterLabs/pcs Group: System Environment/Base @@ -37,7 +37,8 @@ Source4: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_commit # pcs patches: <= 200 Patch0: do-not-support-cluster-setup-with-udp-u-transport.patch Patch1: Support-for-openEuler.patch - +Patch2: backport-make-url-remove_resource-usable-for-stonith-again.patch +Patch3: backport-add-overwrite-to-pcs-cluster-report-documentation.patch # ui patches: >200 # Patch201: name-web-ui.patch @@ -397,6 +398,10 @@ run_all_tests %license pyagentx_LICENSE.txt %changelog +* Fri Nov 15 2024 bixiaoyan - 0.11.8-2 +- make url /remove_resource usable for stonith again +- add '--overwrite' to 'pcs cluster report' documentation + * Sat Aug 31 2024 zouzhimin - 0.11.8-1 - Update package to version 0.11.8 - Updated pcs-web-ui to 0.1.20