diff --git a/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch b/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch new file mode 100644 index 0000000000000000000000000000000000000000..a5be3e7ca2009b9438958628721317fac7b155e5 --- /dev/null +++ b/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch @@ -0,0 +1,25 @@ +From 4404bf1ce3a615dc3069810c49f1cf5f99cce8ce Mon Sep 17 00:00:00 2001 +From: razo7 +Date: Mon, 24 Jul 2023 12:13:27 +0300 +Subject: [PATCH 21/46] fencing: add error message for EC_GENERIC_ERROR + +EC_GENERIC_ERROR was missing a message to be printed +--- + lib/fencing.py.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index c5b5e94a..2c716b43 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -573,6 +573,7 @@ def fail_usage(message="", stop=True): + + def fail(error_code, stop=True): + message = { ++ EC_GENERIC_ERROR : "Failed: Generic error", + EC_LOGIN_DENIED : "Unable to connect/login to fencing device", + EC_CONNECTION_LOST : "Connection lost", + EC_TIMED_OUT : "Connection timed out", +-- +2.25.1 + diff --git a/backport-fencing-use-EC_OK.patch b/backport-fencing-use-EC_OK.patch new file mode 100644 index 0000000000000000000000000000000000000000..8c79a32640f559438f82b1bdae44065b42bbe84a --- /dev/null +++ b/backport-fencing-use-EC_OK.patch @@ -0,0 +1,49 @@ +From ec9d2d2b983d47a3c01be5fb3398b84ce09edfc9 Mon Sep 17 00:00:00 2001 +From: razo7 +Date: Mon, 24 Jul 2023 12:13:39 +0300 +Subject: [PATCH 22/46] fencing: use EC_OK + +EC_OK was not been used +--- + lib/fencing.py.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/fencing.py.py b/lib/fencing.py.py +index 2c716b43..3a60f53e 100644 +--- a/lib/fencing.py.py ++++ b/lib/fencing.py.py +@@ -938,7 +938,7 @@ def show_docs(options, docs=None): + sys.exit(0) + + def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_list=None, reboot_cycle_fn=None, sync_set_power_fn=None): +- result = 0 ++ result = EC_OK + + try: + if "--plug" in options: +@@ -982,11 +982,11 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis + except UnicodeEncodeError as e: + print((outlet_id + options["--separator"] + alias).encode("utf-8") + options["--separator"] + status) + +- return ++ return result + + if options["--action"] == "monitor" and not "port" in options["device_opt"] and "no_status" in options["device_opt"]: + # Unable to do standard monitoring because 'status' action is not available +- return 0 ++ return result + + status = None + if not "no_status" in options["device_opt"]: +@@ -997,7 +997,7 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis + if options["--action"] == status: + if not (status == "on" and "force_on" in options["device_opt"]): + print("Success: Already %s" % (status.upper())) +- return 0 ++ return result + + if options["--action"] == "on": + if set_multi_power_fn(connection, options, set_power_fn, get_power_fn, sync_set_power_fn, 1 + int(options["--retry-on"])): +-- +2.25.1 + diff --git a/fence-agents.spec b/fence-agents.spec index 43fadb2beeedcf22f268f433c3a998ce07dbb585..9066fa2467d821892a4dbe8c4a77214a0d2bd4e5 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -6,7 +6,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.12.1 -Release: 13 +Release: 14 License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -26,6 +26,8 @@ Patch11: backport-fence_aliyun-support-filter-for-list-action.patch Patch12: backport-fence_aliyun-add-credentials-file-support.patch Patch13: backport-fence_aliyun-update-order-for-new-parameters.patch Patch14: backport-fence_ibm_powervs-improved-performance.patch +Patch15: backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch +Patch16: backport-fencing-use-EC_OK.patch # skipped: pve, raritan, rcd-serial, virsh %global allfenceagents %(cat < - 4.12.1-14 +- fencing: add error message for EC_GENERIC_ERROR +- fencing: use EC_OK + * Thu Jun 06 2024 liupei - 4.12.1-13 - fence_ibm_powervs: improved performance