diff --git a/backport-azure_fence-use-correct-credential_scope-and-profile.patch b/backport-azure_fence-use-correct-credential_scope-and-profile.patch deleted file mode 100644 index e8ab1e1b8f045936fe5964ecebd8de1dfbb7c16e..0000000000000000000000000000000000000000 --- a/backport-azure_fence-use-correct-credential_scope-and-profile.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 9087760db005abfd9b3e07319846232214d8dae2 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 16 Jun 2023 16:03:11 +0200 -Subject: [PATCH 15/46] azure_fence: use correct credential_scope and profile - for stack hub - ---- - lib/azure_fence.py.py | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py -index 6f1eee5b..ab40b483 100644 ---- a/lib/azure_fence.py.py -+++ b/lib/azure_fence.py.py -@@ -353,11 +353,19 @@ def get_azure_compute_client(config): - fail_usage("metadata-endpoint not specified") - - try: -+ from azure.profiles import KnownProfiles -+ if (config.Cloud.lower() == "stack"): -+ client_profile = KnownProfiles.v2020_09_01_hybrid -+ credential_scope = cloud_environment.endpoints.active_directory_resource_id + "/.default" -+ else: -+ client_profile = KnownProfiles.default -+ credential_scope = cloud_environment.endpoints.resource_manager + "/.default" - compute_client = ComputeManagementClient( - credentials, - config.SubscriptionId, - base_url=cloud_environment.endpoints.resource_manager, -- credential_scopes=[cloud_environment.endpoints.resource_manager + "/.default"] -+ profile=client_profile, -+ credential_scopes=[credential_scope], - ) - except TypeError: - compute_client = ComputeManagementClient( -@@ -383,11 +391,19 @@ def get_azure_network_client(config): - fail_usage("metadata-endpoint not specified") - - try: -+ from azure.profiles import KnownProfiles -+ if (config.Cloud.lower() == "stack"): -+ client_profile = KnownProfiles.v2020_09_01_hybrid -+ credential_scope = cloud_environment.endpoints.active_directory_resource_id + "/.default" -+ else: -+ client_profile = KnownProfiles.default -+ credential_scope = cloud_environment.endpoints.resource_manager + "/.default" - network_client = NetworkManagementClient( - credentials, - config.SubscriptionId, - base_url=cloud_environment.endpoints.resource_manager, -- credential_scopes=[cloud_environment.endpoints.resource_manager + "/.default"] -+ profile=client_profile, -+ credential_scopes=[credential_scope], - ) - except TypeError: - network_client = NetworkManagementClient( --- -2.25.1 - diff --git a/backport-doc-add-fa-dev-guide-to-README.patch b/backport-doc-add-fa-dev-guide-to-README.patch deleted file mode 100644 index 36b2b837d83a30bca51fb3e2b899571e3ddc2827..0000000000000000000000000000000000000000 --- a/backport-doc-add-fa-dev-guide-to-README.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 304ff12942166e914444fec9b3dc8b3fd4adf3b9 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Jul 2023 16:53:50 +0200 -Subject: [PATCH 19/46] doc: add fa-dev-guide to README - ---- - README.md | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/README.md b/README.md -index 0f3ebbde..30861d22 100644 ---- a/README.md -+++ b/README.md -@@ -19,7 +19,8 @@ for further development. Creating or modifying a new fence agent should be quite - ## Where can I find more information? - - * [ClusterLabs website](http://www.clusterlabs.org/) --* [User and developer documentation](https://github.com/ClusterLabs/fence-agents/tree/master/doc/FenceAgentAPI.md) -+* [Fence Agent Developer's Guide](https://github.com/ClusterLabs/fence-agents/tree/main/doc/fa-dev-guide.md) -+* [User and developer documentation](https://github.com/ClusterLabs/fence-agents/tree/main/doc/FenceAgentAPI.md) - * Mailing lists for [users](http://oss.clusterlabs.org/mailman/listinfo/users) and - [developers](http://oss.clusterlabs.org/mailman/listinfo/developers) - * #clusterlabs IRC channel on [freenode](http://freenode.net/) --- -2.25.1 - diff --git a/backport-doc-add-fa-dev-guide.patch b/backport-doc-add-fa-dev-guide.patch deleted file mode 100644 index b1256790a1e12b5ab51db2f3e88ec00b7df976c0..0000000000000000000000000000000000000000 --- a/backport-doc-add-fa-dev-guide.patch +++ /dev/null @@ -1,233 +0,0 @@ -From aa7522a3d6e47694957dc7993558a71229fee735 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Jul 2023 13:42:59 +0200 -Subject: [PATCH 18/46] doc: add fa-dev-guide - ---- - doc/fa-dev-guide.md | 214 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 214 insertions(+) - create mode 100644 doc/fa-dev-guide.md - -diff --git a/doc/fa-dev-guide.md b/doc/fa-dev-guide.md -new file mode 100644 -index 00000000..6c888dbd ---- /dev/null -+++ b/doc/fa-dev-guide.md -@@ -0,0 +1,214 @@ -+# Fence Agent Developer's Guide -+ -+## Base on current agent -+The easiest way to get started is by starting with an existing agent and remove most of the code in set set_power_status(), get_power_status(), and get_list() and then update the connection and main() code. -+ -+Good choices for existing agents to use as base for new agents: -+- fence_vmware_rest for REST API -+- fence_ilo for other HTTP(S) APIs -+- fence_ilo_ssh for SSH -+- fence_ipmilan for command tools -+- fence_aws/fence_azure (does imports in separate library)/fence_gce for external libraries -+ -+ -+## git -+### Add agent -+- Go to and click Fork to create your own Fork. -+ -+``` -+git clone https://github.com//fence-agents -+git remote add upstream https://github.com/ClusterLabs/fence-agents -+git checkout -b fence_-new-fence-agent -+ -+mkdir agents/ -+vim agents//fence_.py -+ -+# add %package/%description/%files sections for agent in spec-file -+vim fence-agents.spec.in -+ -+./autogen.sh && ./configure -+make xml-upload -+make xml-check -+# make check # optional - runs delay-check (verifies that the agents work correctly with the delay parameter) and xml-check -+ -+git add agents//fence_.py -+git commit -a -c "fence_: new fence agent" -+git push -+``` -+ -+- Click link and create Pull Request. -+ -+ -+### Improve code/add feature/fix bugs in agent or library -+- Run `git log` to see examples of comments to use with -c (or skip -c to enter it in an editor). -+ -+``` -+git checkout main -+git fetch --all -+git rebase upstream/main -+git checkout -b fence_-fix- -+ -+vim agents//fence_.py -+ -+git commit -a -c "fence_: fix " -+git push -+``` -+ -+- Click link and create Pull Request. -+ -+ -+## Development -+### Import libraries/add state dictionary -+To develop you need to import the fencing library and some generic libraries, and define expected values for power states that will be translated translated to "on", "off", or "error". -+ -+The state dictionary contains translations from expected values from the fence device and their corresponding value in fencing (on/off/error). -+ -+Example: -+``` -+import sys -+import atexit -+import logging -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS -+ -+state = {"POWERED_ON": "on", 'POWERED_OFF': "off", 'SUSPENDED': "off"} -+``` -+ -+***only import used functions/return values from the fencing library in the 2nd `from fencing import` line*** -+ -+### Logging and failing -+Use logging.error(), logging.warn(), logging.debug(), and logging.info() to log output. -+- logging.info() should only be used when needed to avoid spamming the logs. -+- logging.debug() is good for debugging (shown when you use -v or set verbose=1). -+- `if options["--verbose-level"] > 1:` can be used to only print additional logging.debug() messages when -vv (or more v's) or verbose=2 or higher. -+ -+Use `fail()` or `fail_usage("Failed: ")` to exit with error-code or log Failed: with generic error code. -+- EC_* error codes can be imported from the fencing library:\ -+ -+ -+### get_power_status() / set_power_status() / get_list() -+- These functions defines the code to get or set status, and get list of nodes, which are run by the fencing library to turn off/on nodes or get a list of nodes available. -+ -+``` -+def get_power_status(conn, options): -+ # code to get power status -+ result = ... -+ return state[result] -+ -+def set_power_status(conn, options): -+ action = { -+ "on" : "start", -+ "off" : "stop" -+ }[options["--action"]] -+ -+ try: -+ # code to set power status. use "action" variable, which translates on and off to the equivalent command that the device expects -+ except Exception as e: -+ logging.debug("Failed: {}".format(e)) -+ fail(EC_STATUS) -+ -+def get_list(conn, options): -+ outlets = {} -+ -+ # code to get node list -+ -+ for r in res["value"]: -+ outlets[r["name"]] = ("", state[r["power_state"]]) -+ -+ return outlets -+``` -+ -+### define_new_opts() -+Specifies device specific parameters with defaults. -+- getopt is ":" for parameters that require a value and "" for parameters that get set without a value (e.g. -v) -+- do not use short short opts (e.g. "a:" or "a") as they are reserved for the fencing library -+- set required to 1 if the parameter is required (except for -o metadata or -h/--help) -+- Use `if "--" in options:` to check value-less parameters like --verbose and `if options.get("--") == "":` to check the value of parameters. -+ -+``` -+def define_new_opts(): -+ all_opt["api_path"] = { -+ "getopt" : ":", -+ "longopt" : "api-path", -+ "help" : "--api-path=[path] The path part of the API URL", -+ "default" : "/rest", -+ "required" : "0", -+ "shortdesc" : "The path part of the API URL", -+ "order" : 2} -+ all_opt["filter"] = { -+ "getopt" : ":", -+ "longopt" : "filter", -+ "help" : "--filter=[filter] Filter to only return relevant VMs" -+ " (e.g. \"filter.names=node1&filter.names=node2\").", -+ "required" : "0", -+ "shortdesc" : "Filter to only return relevant VMs. It can be used to avoid " -+ "the agent failing when more than 1000 VMs should be returned.", -+ "order" : 2} -+``` -+ -+### main() -+Defines parameters and general logic to show docs (when requested), or run specific fence action. -+- device_opt[] is a list of parameters to be used from the fencing library -+- define_new_opts() adds the device specific parameters defined above -+- all_opt["parameter"]["default"] allows you to override the default value for -+ parameters from the fencing library -+- options = check_input(device_opt, process_input(device_opt)) processes all the parameters -+ and checks that they are of the expected type -+- docs["shortdesc"] / docs["longdesc"] allows settings short and long description for metadata/help text (-h) -+- show_docs(options, docs) prints metadata or help text depending on whether you specify -o metadata or -h -+- run_delay(options) delays the fencing agent --delay=/delay= seconds when set -+- conn = connect(options) specifies function to call, and registers the connection as conn -+- atexit.register(disconnect, conn) tells the agent to run disconnect(conn) when it exits (e.g. timeouts or fails) -+- result = fence_action(conn, options, set_power_status, get_power_status, get_list) run set_power_status(), -+ get_power_status(), or get_list() depending on which action (-o) was specified -+- sys.exit(result) return return code from function run by fence_action() -+ -+``` -+def main(): -+ device_opt = [ -+ "ipaddr", -+ "api_path", -+ "login", -+ "passwd", -+ "ssl", -+ "notls", -+ "web", -+ "port", -+ "filter", -+ ] -+ -+ atexit.register(atexit_handler) -+ define_new_opts() -+ -+ all_opt["shell_timeout"]["default"] = "5" -+ all_opt["power_wait"]["default"] = "1" -+ -+ options = check_input(device_opt, process_input(device_opt)) -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for VMware REST API" -+ docs["longdesc"] = """fence_vmware_rest is an I/O Fencing agent which can be \ -+used with VMware API to fence virtual machines. -+ -+NOTE: If there's more than 1000 VMs there is a filter parameter to work around \ -+the API limit. See https://code.vmware.com/apis/62/vcenter-management#/VM%20/get_vcenter_vm \ -+for full list of filters.""" -+ docs["vendorurl"] = "https://www.vmware.com" -+ show_docs(options, docs) -+ -+ #### -+ ## Fence operations -+ #### -+ run_delay(options) -+ -+ conn = connect(options) -+ atexit.register(disconnect, conn) -+ -+ result = fence_action(conn, options, set_power_status, get_power_status, get_list) -+ -+ sys.exit(result) -+ -+if __name__ == "__main__": -+ main() -+``` --- -2.25.1 - diff --git a/backport-fa-dev-guide-add-General-git-section.patch b/backport-fa-dev-guide-add-General-git-section.patch deleted file mode 100644 index d0ffdfe243e3c158a55a17282c086c43b12d21c3..0000000000000000000000000000000000000000 --- a/backport-fa-dev-guide-add-General-git-section.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a62176babef8dc74b0f72ed854392afaef3daf8e Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 24 Jul 2023 11:47:11 +0200 -Subject: [PATCH 23/46] fa-dev-guide: add General git section - ---- - doc/fa-dev-guide.md | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/doc/fa-dev-guide.md b/doc/fa-dev-guide.md -index 6c888dbd..8c349274 100644 ---- a/doc/fa-dev-guide.md -+++ b/doc/fa-dev-guide.md -@@ -12,6 +12,14 @@ Good choices for existing agents to use as base for new agents: - - - ## git -+### General -+- Commit messages should start with "fence_: ", "fencing: " (or other library name), "build: ".\ -+ If in doubt run `git log` to find examples. -+- PRs without correct prefix will get squashed to correct it as part of the merge process. -+- If any parameters or descriptions has been updated you'll have to run `./autogen.sh && ./configure` followed by `make xml-upload`. -+- Build requirements can be easily installed on Fedora by running `sudo dnf builddep fence-agents-all`. -+ -+ - ### Add agent - - Go to and click Fork to create your own Fork. - --- -2.25.1 - diff --git a/backport-fa-dev-guide-add-reboot_cycle-section.patch b/backport-fa-dev-guide-add-reboot_cycle-section.patch deleted file mode 100644 index 97db23c5939a4d52f63b5810ebf9c2199313bc8c..0000000000000000000000000000000000000000 --- a/backport-fa-dev-guide-add-reboot_cycle-section.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 3ea95247a182598f8b0d4aa24f417569f3efaa82 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 24 Jul 2023 12:13:16 +0200 -Subject: [PATCH 24/46] fa-dev-guide: add reboot_cycle() section - ---- - doc/fa-dev-guide.md | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/doc/fa-dev-guide.md b/doc/fa-dev-guide.md -index 8c349274..0ab8f770 100644 ---- a/doc/fa-dev-guide.md -+++ b/doc/fa-dev-guide.md -@@ -127,6 +127,31 @@ def get_list(conn, options): - return outlets - ``` - -+### reboot_cycle() -+***The reboot cycle method is not recommended as it might report success before the node is powered off.*** -+- fence_ipmilan contains a minimal reboot_cycle() approach. -+- Add "method" to the device_opt list. -+- Update all_opt["method"]["help"] with a warning that it might report success before the node is powered off. -+- Add reboot_cycle function to fence_action() call in main(). -+ -+Example: -+``` -+def reboot_cycle(_, options): -+ output = _run_command(options, "cycle") -+ return bool(re.search('chassis power control: cycle', str(output).lower())) -+... -+ -+def main(): -+... -+ device_opt = [ ..., "method" ] -+... -+ all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: onoff)\n" \ -+ "WARNING! This fence agent might report success before the node is powered off. " \ -+ "You should use -m/method onoff if your fence device works correctly with that option." -+... -+ result = fence_action(None, options, set_power_status, get_power_status, None, reboot_cycle) -+``` -+ - ### define_new_opts() - Specifies device specific parameters with defaults. - - getopt is ":" for parameters that require a value and "" for parameters that get set without a value (e.g. -v) --- -2.25.1 - diff --git a/backport-fa-dev-guide-improve-fail-error-code-description.patch b/backport-fa-dev-guide-improve-fail-error-code-description.patch deleted file mode 100644 index 35b8bb9b0c311b37d3012b888acdd1aef3356d68..0000000000000000000000000000000000000000 --- a/backport-fa-dev-guide-improve-fail-error-code-description.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 422c42bd192bb10e4eaaf3621e5e1ae0508ec261 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 24 Jul 2023 12:39:00 +0200 -Subject: [PATCH 25/46] fa-dev-guide: improve fail()/error code description - ---- - doc/fa-dev-guide.md | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/doc/fa-dev-guide.md b/doc/fa-dev-guide.md -index 0ab8f770..29145307 100644 ---- a/doc/fa-dev-guide.md -+++ b/doc/fa-dev-guide.md -@@ -91,9 +91,11 @@ Use logging.error(), logging.warn(), logging.debug(), and logging.info() to log - - logging.debug() is good for debugging (shown when you use -v or set verbose=1). - - `if options["--verbose-level"] > 1:` can be used to only print additional logging.debug() messages when -vv (or more v's) or verbose=2 or higher. - --Use `fail()` or `fail_usage("Failed: ")` to exit with error-code or log Failed: with generic error code. -+Use `fail()` or `fail_usage("Failed: ")` to exit with error code message or log Failed: with generic error code. -+- fail() logs the specified error message from and exit with generic error code. - - EC_* error codes can be imported from the fencing library:\ - -+- To exit with specific error codes either use logging.error() followed by sys.exit() or fail(, stop=False), which allows you to return or sys.exit() with other error codes. - - ### get_power_status() / set_power_status() / get_list() - - These functions defines the code to get or set status, and get list of nodes, which are run by the fencing library to turn off/on nodes or get a list of nodes available. -@@ -146,7 +148,7 @@ def main(): - device_opt = [ ..., "method" ] - ... - all_opt["method"]["help"] = "-m, --method=[method] Method to fence (onoff|cycle) (Default: onoff)\n" \ -- "WARNING! This fence agent might report success before the node is powered off. " \ -+ "WARNING! This fence agent might report success before the node is powered off, when cycle method is used. " \ - "You should use -m/method onoff if your fence device works correctly with that option." - ... - result = fence_action(None, options, set_power_status, get_power_status, None, reboot_cycle) --- -2.25.1 - diff --git a/backport-fail-when-power-action-request-fails.patch b/backport-fail-when-power-action-request-fails.patch deleted file mode 100644 index b8a8a0d4b55ed794314ac308cf5fdfcc5f7b1297..0000000000000000000000000000000000000000 --- a/backport-fail-when-power-action-request-fails.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a2e2432cfec0af9a8a90f9d7fed18759da6f9b0c Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 13 Apr 2023 10:14:31 +0200 -Subject: [PATCH] fence_aws: fail when power action request fails - -Conflict:NA -Reference:https://github.com/ClusterLabs/fence-agents/pull/536/commits/a2e2432cfec0af9a8a90f9d7fed18759da6f9b0c ---- - agents/aws/fence_aws.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index 5d1677144..0a375bbec 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -116,6 +116,7 @@ def set_power_status(conn, options): - except Exception as e: - logger.debug("Failed to power %s %s: %s", \ - options["--action"], options["--plug"], e) -+ fail(EC_STATUS) - - def define_new_opts(): - all_opt["region"] = { diff --git a/backport-fence_aliyun-add-credentials-file-support.patch b/backport-fence_aliyun-add-credentials-file-support.patch deleted file mode 100644 index 12c313d85a1340a10beed862e78001a417d272a5..0000000000000000000000000000000000000000 --- a/backport-fence_aliyun-add-credentials-file-support.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 8dd4b65fb2c9b5f3db545f589a8914792f677cf2 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 2 Apr 2024 14:37:00 +0200 -Subject: [PATCH 39/46] fence_aliyun: add credentials file support - ---- - agents/aliyun/fence_aliyun.py | 31 ++++++++++++++++++++++++++-- - tests/data/metadata/fence_aliyun.xml | 9 ++++++++ - 2 files changed, 38 insertions(+), 2 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 134cc5ab..b271eb0b 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -150,20 +150,37 @@ def define_new_opts(): - "required": "0", - "order": 5 - } -+ all_opt["credentials_file"] = { -+ "getopt": ":", -+ "longopt": "credentials-file", -+ "help": "--credentials-file=[path] Path to aliyun-cli credentials file", -+ "shortdesc": "Path to credentials file", -+ "required": "0", -+ "order": 6 -+ } -+ all_opt["credentials_file_profile"] = { -+ "getopt": ":", -+ "longopt": "credentials-file-profile", -+ "help": "--credentials-file-profile=[profile] Credentials file profile", -+ "shortdesc": "Credentials file profile", -+ "required": "0", -+ "default": "default", -+ "order": 6 -+ } - all_opt["filter"] = { - "getopt": ":", - "longopt": "filter", - "help": "--filter=[key=value] Filter (e.g. InstanceIds=[\"i-XXYYZZAA1\",\"i-XXYYZZAA2\"]", - "shortdesc": "Filter for list-action.", - "required": "0", -- "order": 6 -+ "order": 7 - } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "ram_role", "filter"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "ram_role", "credentials_file", "credentials_file_profile", "filter"] - - atexit.register(atexit_handler) - -@@ -191,6 +208,16 @@ def main(): - ram_role = options["--ram-role"] - role = EcsRamRoleCredential(ram_role) - conn = client.AcsClient(region_id=region, credential=role) -+ elif "--credentials-file" in options and "--credentials-file-profile" in options: -+ import os, configparser -+ try: -+ config = configparser.ConfigParser() -+ config.read(os.path.expanduser(options["--credentials-file"])) -+ access_key = config.get(options["--credentials-file-profile"], "aliyun_access_key_id") -+ secret_key = config.get(options["--credentials-file-profile"], "aliyun_access_key_secret") -+ conn = client.AcsClient(access_key, secret_key, region) -+ except Exception as e: -+ fail_usage("Failed: failed to read credentials file: %s" % e) - else: - fail_usage("Failed: User credentials are not set. Please set the Access Key and the Secret Key, or configure the RAM role.") - -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index a52de014..ea20f5f3 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -38,6 +38,15 @@ - - Ram Role. - -+ -+ -+ Path to credentials file -+ -+ -+ -+ -+ Credentials file profile -+ - - - --- -2.25.1 - diff --git a/backport-fence_aliyun-support-filter-for-list-action.patch b/backport-fence_aliyun-support-filter-for-list-action.patch deleted file mode 100644 index 1ad03624a111855323c3aa60ea64da92a3c9589f..0000000000000000000000000000000000000000 --- a/backport-fence_aliyun-support-filter-for-list-action.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 525789dcdcb1e89f8b3dd2438b2fc3b2277f5cfe Mon Sep 17 00:00:00 2001 -From: sunhui -Date: Sun, 23 Apr 2023 14:58:36 +0800 -Subject: [PATCH 07/46] fence_aliyun: support filter for list-action - ---- - agents/aliyun/fence_aliyun.py | 20 ++++++++++++++++++-- - tests/data/metadata/fence_aliyun.xml | 5 +++++ - 2 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index 1e9c790c..c7785a2b 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -76,6 +76,14 @@ def get_nodes_list(conn, options): - result = {} - request = DescribeInstancesRequest() - request.set_PageSize(100) -+ -+ if "--filter" in options: -+ filter_key = options["--filter"].split("=")[0].strip() -+ filter_value = options["--filter"].split("=")[1].strip() -+ params = request.get_query_params() -+ params[filter_key] = filter_value -+ request.set_query_params(params) -+ - response = _send_request(conn, request) - if response is not None: - instance_list = response.get('Instances').get('Instance') -@@ -137,17 +145,25 @@ def define_new_opts(): - all_opt["ram_role"] = { - "getopt": ":", - "longopt": "ram-role", -- "help": "--ram-role=[name] Ram Role", -+ "help": "--ram-role=[name] Ram Role", - "shortdesc": "Ram Role.", - "required": "0", - "order": 5 - } -+ all_opt["filter"] = { -+ "getopt": ":", -+ "longopt": "filter", -+ "help": "--filter=[key=value] Filter (e.g. InstanceIds=[\"i-XXYYZZAA1\",\"i-XXYYZZAA2\"]", -+ "shortdesc": "Filter for list-action.", -+ "required": "0", -+ "order": 6 -+ } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "ram_role"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "ram_role", "filter"] - - atexit.register(atexit_handler) - -diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml -index 56d79204..b0671889 100644 ---- a/tests/data/metadata/fence_aliyun.xml -+++ b/tests/data/metadata/fence_aliyun.xml -@@ -38,6 +38,11 @@ - - Ram Role. - -+ -+ -+ -+ Filter for list-action. -+ - - - --- -2.25.1 - diff --git a/backport-fence_aliyun-update-order-for-new-parameters.patch b/backport-fence_aliyun-update-order-for-new-parameters.patch deleted file mode 100644 index 11d77e521ac0d4761d19812cdcac3107ee80953c..0000000000000000000000000000000000000000 --- a/backport-fence_aliyun-update-order-for-new-parameters.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 860da80c03b4b154ca4495adb72b959e278d55b1 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Tue, 2 Apr 2024 16:46:16 +0200 -Subject: [PATCH 40/46] fence_aliyun: update order for new parameters - ---- - agents/aliyun/fence_aliyun.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py -index b271eb0b..788ac647 100644 ---- a/agents/aliyun/fence_aliyun.py -+++ b/agents/aliyun/fence_aliyun.py -@@ -165,7 +165,7 @@ def define_new_opts(): - "shortdesc": "Credentials file profile", - "required": "0", - "default": "default", -- "order": 6 -+ "order": 7 - } - all_opt["filter"] = { - "getopt": ":", -@@ -173,7 +173,7 @@ def define_new_opts(): - "help": "--filter=[key=value] Filter (e.g. InstanceIds=[\"i-XXYYZZAA1\",\"i-XXYYZZAA2\"]", - "shortdesc": "Filter for list-action.", - "required": "0", -- "order": 7 -+ "order": 8 - } - - # Main agent method --- -2.25.1 - diff --git a/backport-fence_azure_arm-add-stack-cloud-support.patch b/backport-fence_azure_arm-add-stack-cloud-support.patch deleted file mode 100644 index 83dbaf3992f15fca2aa587ad56eb56e7229c61df..0000000000000000000000000000000000000000 --- a/backport-fence_azure_arm-add-stack-cloud-support.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 6e0228536d30ca1bd95bfd1628c0247f094ecaa8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 2 Mar 2022 13:49:16 +0100 -Subject: [PATCH 14/46] fence_azure_arm: add stack cloud support - ---- - agents/azure_arm/fence_azure_arm.py | 18 ++++++++++++++---- - lib/azure_fence.py.py | 10 ++++++++++ - tests/data/metadata/fence_azure_arm.xml | 10 ++++++++++ - 3 files changed, 34 insertions(+), 4 deletions(-) - -diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py -index 6908169c..e3b7c85c 100755 ---- a/agents/azure_arm/fence_azure_arm.py -+++ b/agents/azure_arm/fence_azure_arm.py -@@ -183,20 +183,30 @@ def define_new_opts(): - "getopt" : ":", - "longopt" : "cloud", - "help" : "--cloud=[name] Name of the cloud you want to use. Supported\n\ -- values are china, germany or usgov. Do not use\n\ -- this parameter if you want to use public\n\ -- Azure.", -+ values are china, germany, usgov, or stack. Do\n\ -+ not use this parameter if you want to use\n\ -+ public Azure.", - "shortdesc" : "Name of the cloud you want to use.", - "required" : "0", - "order" : 7 - } -+ all_opt["metadata-endpoint"] = { -+ "getopt" : ":", -+ "longopt" : "metadata-endpoint", -+ "help" : "--metadata-endpoint=[URL] URL to metadata endpoint (used when cloud=stack).", -+ "shortdesc" : "URL to metadata endpoint (used when cloud=stack).", -+ "required" : "0", -+ "order" : 8 -+ } - - # Main agent method - def main(): - compute_client = None - network_client = None - -- device_opt = ["login", "no_login", "no_password", "passwd", "port", "resourceGroup", "tenantId", "subscriptionId", "network-fencing", "msi", "cloud"] -+ device_opt = ["login", "no_login", "no_password", "passwd", "port", -+ "resourceGroup", "tenantId", "subscriptionId", -+ "network-fencing", "msi", "cloud", "metadata-endpoint"] - - atexit.register(atexit_handler) - -diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py -index 5ca71eb4..6f1eee5b 100644 ---- a/lib/azure_fence.py.py -+++ b/lib/azure_fence.py.py -@@ -251,6 +251,7 @@ def get_azure_config(options): - config.VMName = options.get("--plug") - config.SubscriptionId = options.get("--subscriptionId") - config.Cloud = options.get("--cloud") -+ config.MetadataEndpoint = options.get("--metadata-endpoint") - config.UseMSI = "--msi" in options - config.Tenantid = options.get("--tenantId") - config.ApplicationId = options.get("--username") -@@ -279,6 +280,9 @@ def get_azure_cloud_environment(config): - elif (config.Cloud.lower() == "usgov"): - from msrestazure.azure_cloud import AZURE_US_GOV_CLOUD - cloud_environment = AZURE_US_GOV_CLOUD -+ elif (config.Cloud.lower() == "stack"): -+ from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint -+ cloud_environment = get_cloud_from_metadata_endpoint(config.MetadataEndpoint) - - return cloud_environment - -@@ -345,6 +349,9 @@ def get_azure_compute_client(config): - credentials = get_azure_credentials(config) - - if cloud_environment: -+ if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") -+ - try: - compute_client = ComputeManagementClient( - credentials, -@@ -372,6 +379,9 @@ def get_azure_network_client(config): - credentials = get_azure_credentials(config) - - if cloud_environment: -+ if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: -+ fail_usage("metadata-endpoint not specified") -+ - try: - network_client = NetworkManagementClient( - credentials, -diff --git a/tests/data/metadata/fence_azure_arm.xml b/tests/data/metadata/fence_azure_arm.xml -index c6e1f203..8b745076 100644 ---- a/tests/data/metadata/fence_azure_arm.xml -+++ b/tests/data/metadata/fence_azure_arm.xml -@@ -98,6 +98,16 @@ When using network fencing the reboot-action will cause a quick-return once the - - Name of the cloud you want to use. - -+ -+ -+ -+ URL to metadata endpoint (used when cloud=stack). -+ -+ -+ -+ -+ URL to metadata endpoint (used when cloud=stack). -+ - - - --- -2.25.1 - diff --git a/backport-fence_eaton_ssh-new-fence-agent-for-Eaton-ePDU-G3-over-ssh.patch b/backport-fence_eaton_ssh-new-fence-agent-for-Eaton-ePDU-G3-over-ssh.patch deleted file mode 100644 index 79bf95d4c443e36a0f163152fa77a9121ca71d93..0000000000000000000000000000000000000000 --- a/backport-fence_eaton_ssh-new-fence-agent-for-Eaton-ePDU-G3-over-ssh.patch +++ /dev/null @@ -1,714 +0,0 @@ -From 849861d2bdf76f70c7ee0b97387a27082f8a3fdd Mon Sep 17 00:00:00 2001 -From: Enno G -Date: Mon, 26 Jun 2023 11:05:59 +0200 -Subject: [PATCH 16/46] fence_eaton_ssh: new fence agent for Eaton ePDU G3 over - SSH (#549) - -* fence_eaton_ssh: Initial add -* Docker: Add dockerized build environment -* Fix incorrect repository path in configure.ac ---- - README.md | 19 +- - agents/eaton_ssh/fence_eaton_ssh.py | 318 ++++++++++++++++++++++++ - configure.ac | 2 +- - docker/Dockerfile | 34 +++ - docker/README.md | 10 + - docker/entrypoint.sh | 8 + - fence-agents.spec.in | 13 + - tests/data/metadata/fence_eaton_ssh.xml | 206 +++++++++++++++ - 8 files changed, 603 insertions(+), 7 deletions(-) - create mode 100644 agents/eaton_ssh/fence_eaton_ssh.py - create mode 100644 docker/Dockerfile - create mode 100644 docker/README.md - create mode 100755 docker/entrypoint.sh - create mode 100644 tests/data/metadata/fence_eaton_ssh.xml - -diff --git a/README.md b/README.md -index d9fcb94b..0f3ebbde 100644 ---- a/README.md -+++ b/README.md -@@ -1,18 +1,25 @@ - # Fence agents - --Fence agents were developed as device "drivers" which are able to prevent computers from destroying data on shared storage. Their aim is to isolate a corrupted computer, using one of three methods: -+Fence agents were developed as device "drivers" which are able to prevent computers from destroying data on shared -+storage. Their aim is to isolate a corrupted computer, using one of three methods: - -- * Power - A computer that is switched off cannot corrupt data, but it is important to not do a "soft-reboot" as we won't know if this is possible. This also works for virtual machines when the fence device is a hypervisor. -- * Network - Switches can prevent routing to a given computer, so even if a computer is powered on it won't be able to harm the data. -+ * Power - A computer that is switched off cannot corrupt data, but it is important to not do a "soft-reboot" as we -+ won't know if this is possible. This also works for virtual machines when the fence device is a hypervisor. -+ * Network - Switches can prevent routing to a given computer, so even if a computer is powered on it won't be able to -+ harm the data. - * Configuration - Fibre-channel switches or SCSI devices allow us to limit who can write to managed disks. - --Fence agents do not use configuration files, as configuration management is outside of their scope. All of the configuration has to be specified either as command-line arguments or lines of standard input (see the complete list for more info). -+Fence agents do not use configuration files, as configuration management is outside of their scope. All of the -+configuration has to be specified either as command-line arguments or lines of standard input (see the complete list -+for more info). - --Because many fence agents are quite similar to each other, a fencing library (in Python) was developed. Please use it for further development. Creating or modifying a new fence agent should be quite simple using this library. -+Because many fence agents are quite similar to each other, a fencing library (in Python) was developed. Please use it -+for further development. Creating or modifying a new fence agent should be quite simple using this library. - - ## Where can I find more information? - - * [ClusterLabs website](http://www.clusterlabs.org/) - * [User and developer documentation](https://github.com/ClusterLabs/fence-agents/tree/master/doc/FenceAgentAPI.md) --* Mailing lists for [users](http://oss.clusterlabs.org/mailman/listinfo/users) and [developers](http://oss.clusterlabs.org/mailman/listinfo/developers) -+* Mailing lists for [users](http://oss.clusterlabs.org/mailman/listinfo/users) and -+ [developers](http://oss.clusterlabs.org/mailman/listinfo/developers) - * #clusterlabs IRC channel on [freenode](http://freenode.net/) -diff --git a/agents/eaton_ssh/fence_eaton_ssh.py b/agents/eaton_ssh/fence_eaton_ssh.py -new file mode 100644 -index 00000000..8e536a2e ---- /dev/null -+++ b/agents/eaton_ssh/fence_eaton_ssh.py -@@ -0,0 +1,318 @@ -+#!@PYTHON@ -tt -+ -+""" -+Plug numbering starts with 1! There were no tests performed so far with daisy chained PDUs. -+ -+Example usage: -+ fence_eaton_ssh -v -a -l -p --login-timeout=60 --action status --plug 1 -+""" -+ -+##### -+## -+## The Following Agent Has Been Tested On: -+## -+## Model Firmware -+## +---------------------------------------------+ -+## EMAB04 04.02.0001 -+##### -+ -+import enum -+import sys -+import atexit -+ -+sys.path.append("@FENCEAGENTSLIBDIR@") -+from fencing import * -+from fencing import fail, EC_STATUS, EC_LOGIN_DENIED -+ -+ -+class FenceEatonPowerActions(enum.Enum): -+ """ -+ Status of the plug on the PDU. -+ """ -+ ERROR = -1 -+ OFF = 0 -+ ON = 1 -+ PENDING_OFF = 2 -+ PENDING_ON = 3 -+ -+ -+def get_plug_names(conn, plug_ids, command_prompt, shell_timout): -+ """ -+ Get the names of plugs via their ID. -+ -+ :param conn: The "fspawn" object. -+ :param plug_ids: The list of plug IDs. Plugs start with the ID 1. -+ :param command_prompt: The characters that make up the base prompt. This is important to detect a finished command. -+ :param shell_timeout: The maximum time the shell should wait for a response. -+ :returns: The name of the requested plugs. -+ """ -+ # fspawn is subclassed from pexpect which is not correctly type annotated in all cases. -+ result = {} -+ full_node_mapping = {} -+ conn.send_eol("get PDU.OutletSystem.Outlet[x].iName") -+ conn.log_expect(command_prompt, shell_timout) -+ result_plug_names = conn.before.split("\n") # type: ignore -+ if len(result_plug_names) != 3: -+ fail(EC_STATUS) -+ plug_names = result_plug_names.split("|") -+ for counter in range(1, len(plug_names)): -+ full_node_mapping[counter] = plug_names[counter] -+ for plug_id in plug_ids: -+ result[plug_id] = full_node_mapping[plug_id] -+ return result -+ -+ -+def get_plug_ids(conn, nodenames, command_prompt, shell_timout): -+ """ -+ Get the IDs that map to the given nodenames. Non existing names are skipped. -+ -+ :param conn: The "fspawn" object. -+ :param nodenames: The list of human readable names that should be converted to IDs. -+ :param command_prompt: The characters that make up the base prompt. This is important to detect a finished command. -+ :param shell_timeout: The maximum time the shell should wait for a response. -+ :returns: A dictionary - possibly empty - where the keys are the node names and the values are the node IDs. -+ """ -+ result = {} -+ full_node_mapping = {} -+ conn.send_eol("get PDU.OutletSystem.Outlet[x].iName") -+ conn.log_expect(command_prompt, shell_timout) -+ result_plug_names = conn.before.split("\n") # type: ignore -+ if len(result_plug_names) != 3: -+ fail(EC_STATUS) -+ plug_names = result_plug_names.split("|") -+ for counter in range(1, len(plug_names)): -+ full_node_mapping[plug_names[counter]] = counter -+ for node in nodenames: -+ if node in full_node_mapping: -+ result[node] = full_node_mapping[node] -+ return result -+ -+ -+def get_plug_count(conn, command_prompt, shell_timout): -+ """ -+ Get the number of plugs that the PDU has. -+ -+ In case the PDU is daisy chained this also contains the plugs of the other PDUs. -+ -+ :param conn: The "fspawn" object. -+ :param command_prompt: The characters that make up the base prompt. This is important to detect a finished command. -+ :param shell_timeout: The maximum time the shell should wait for a response. -+ :returns: The number of plugs that the PDU has. -+ """ -+ # fspawn is subclassed from pexpect which is not correctly type annotated in all cases. -+ conn.send_eol("get PDU.OutletSystem.Outlet.Count") -+ conn.log_expect(command_prompt, shell_timout) -+ result_plug_count = conn.before.split("\n") # type: ignore -+ if len(result_plug_count) != 3: -+ fail(EC_STATUS) -+ return int(result_plug_count[1].strip()) -+ -+ -+def get_plug_status(conn, plug_id, command_prompt, shell_timout): -+ """ -+ Get the current status of the plug. The return value of this doesn't account for operations that will act via -+ schedules or a delay. As such the status is only valid at the time of retrieval. -+ -+ :param conn: The "fspawn" object. -+ :param plug_id: The ID of the plug that should be powered off. Counting plugs starts at 1. -+ :returns: The current status of the plug. -+ """ -+ # fspawn is subclassed from pexpect which is not correctly type annotated in all cases. -+ conn.send_eol(f"get PDU.OutletSystem.Outlet[{plug_id}].PresentStatus.SwitchOnOff") -+ conn.log_expect(command_prompt, shell_timout) -+ result_plug_status = conn.before.split("\n") # type: ignore -+ if len(result_plug_status) != 3: -+ fail(EC_STATUS) -+ if result_plug_status[1].strip() == "0": -+ return FenceEatonPowerActions.OFF -+ elif result_plug_status[1].strip() == "1": -+ return FenceEatonPowerActions.ON -+ else: -+ return FenceEatonPowerActions.ERROR -+ -+ -+def power_on_plug(conn, plug_id, command_prompt, shell_timout, delay=0): -+ """ -+ Powers on a plug with an optional delay. -+ -+ :param conn: The "fspawn" object. -+ :param plug_id: The ID of the plug that should be powered off. Counting plugs starts at 1. -+ :param command_prompt: The characters that make up the base prompt. This is important to detect a finished command. -+ :param shell_timeout: The maximum time the shell should wait for a response. -+ :param delay: The delay in seconds. Passing "-1" aborts the power off action. -+ """ -+ conn.send_eol(f"set PDU.OutletSystem.Outlet[{plug_id}].DelayBeforeStartup {delay}") -+ conn.log_expect(command_prompt, shell_timout) -+ -+ -+def power_off_plug(conn, plug_id, command_prompt, shell_timout, delay=0): -+ """ -+ Powers off a plug with an optional delay. -+ -+ :param conn: The "fspawn" object. -+ :param plug_id: The ID of the plug that should be powered off. Counting plugs starts at 1. -+ :param command_prompt: The characters that make up the base prompt. This is important to detect a finished command. -+ :param shell_timeout: The maximum time the shell should wait for a response. -+ :param delay: The delay in seconds. Passing "-1" aborts the power off action. -+ """ -+ conn.send_eol(f"set PDU.OutletSystem.Outlet[{plug_id}].DelayBeforeShutdown {delay}") -+ conn.log_expect(command_prompt, shell_timout) -+ -+ -+def get_power_status(conn, options): -+ """ -+ Retrieve the power status for the requested plug. Since we have a serial like interface via SSH we need to parse the -+ output of the SSH session manually. -+ -+ If abnormal behavior is detected the method will exit via "fail()". -+ -+ :param conn: The "fspawn" object. -+ :param options: The option dictionary. -+ :returns: In case there is an error this method does not return but instead calls "sys.exit". Otherwhise one of -+ "off", "on" or "error" is returned. -+ """ -+ if conn is None: -+ fail(EC_LOGIN_DENIED) -+ -+ requested_plug = options.get("--plug", "") -+ if not requested_plug: -+ fail(EC_STATUS) -+ plug_status = get_plug_status( -+ conn, # type: ignore -+ int(requested_plug), -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ if plug_status == FenceEatonPowerActions.OFF: -+ return "off" -+ elif plug_status == FenceEatonPowerActions.ON: -+ return "on" -+ else: -+ return "error" -+ -+ -+def set_power_status(conn, options): -+ """ -+ Set the power status for the requested plug. Only resposible for powering on and off. -+ -+ If abnormal behavior is detected the method will exit via "fail()". -+ -+ :param conn: The "fspawn" object. -+ :param options: The option dictionary. -+ :returns: In case there is an error this method does not return but instead calls "sys.exit". -+ """ -+ if conn is None: -+ fail(EC_LOGIN_DENIED) -+ -+ requested_plug = options.get("--plug", "") -+ if not requested_plug: -+ fail(EC_STATUS) -+ requested_action = options.get("--action", "") -+ if not requested_action: -+ fail(EC_STATUS) -+ -+ if requested_action == "off": -+ power_off_plug( -+ conn, # type: ignore -+ int(requested_plug), -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ elif requested_action == "on": -+ power_on_plug( -+ conn, # type: ignore -+ int(requested_plug), -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ else: -+ fail(EC_STATUS) -+ -+ -+def get_outlet_list(conn, options): -+ """ -+ Retrieves the list of plugs with their correspondin status. -+ -+ :param conn: The "fspawn" object. -+ :param options: The option dictionary. -+ :returns: Keys are the Plug IDs which each have a Tuple with the alias for the plug and its status. -+ """ -+ if conn is None: -+ fail(EC_LOGIN_DENIED) -+ -+ result = {} -+ plug_count = get_plug_count(conn, options["--command-prompt"], int(options["--shell-timeout"])) # type: ignore -+ for counter in range(1, plug_count): -+ plug_names = get_plug_names( -+ conn, # type: ignore -+ [counter], -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ plug_status_enum = get_plug_status( -+ conn, # type: ignore -+ counter, -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ if plug_status_enum == FenceEatonPowerActions.OFF: -+ plug_status = "OFF" -+ elif plug_status_enum == FenceEatonPowerActions.ON: -+ plug_status = "ON" -+ else: -+ plug_status = None -+ result[str(counter)] = (plug_names[counter], plug_status) -+ return result -+ -+ -+def reboot_cycle(conn, options) -> None: -+ """ -+ Responsible for power cycling a machine. Not responsible for singular on and off actions. -+ -+ :param conn: The "fspawn" object. -+ :param options: The option dictionary. -+ """ -+ requested_plug = options.get("--plug", "") -+ if not requested_plug: -+ fail(EC_STATUS) -+ -+ power_off_plug( -+ conn, # type: ignore -+ int(requested_plug), -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ power_on_plug( -+ conn, # type: ignore -+ int(requested_plug), -+ options["--command-prompt"], -+ int(options["--shell-timeout"]) -+ ) -+ -+ -+def main(): -+ """ -+ Main entrypoint for the fence_agent. -+ """ -+ device_opt = ["secure", "ipaddr", "login", "passwd", "port", "cmd_prompt"] -+ atexit.register(atexit_handler) -+ options = check_input(device_opt, process_input(device_opt)) -+ options["--ssh"] = None -+ options["--ipport"] = 22 -+ options["--command-prompt"] = "pdu#0>" -+ -+ docs = {} -+ docs["shortdesc"] = "Fence agent for Eaton ePDU G3 over SSH" -+ docs["longdesc"] = "fence_eaton_ssh is a fence agent that connects to Eaton ePDU devices. It logs into \ -+device via ssh and reboot a specified outlet." -+ docs["vendorurl"] = "https://www.eaton.com/" -+ show_docs(options, docs) -+ -+ conn = fence_login(options) -+ result = fence_action(conn, options, set_power_status, get_power_status, get_outlet_list, reboot_cycle) -+ fence_logout(conn, "quit") -+ sys.exit(result) -+ -+ -+if __name__ == "__main__": -+ main() -diff --git a/configure.ac b/configure.ac -index 65a9718d..8436ba25 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -567,7 +567,7 @@ if test "x$VERSION" = "xUNKNOWN"; then - configure was unable to determine the source tree's current version. This - generally happens when using git archive (or the github download button) - generated tarball/zip file. In order to workaround this issue, either use git -- clone https://github.com/ClusterLabs/fence-virt.git or use an official release -+ clone https://github.com/ClusterLabs/fence-agents.git or use an official release - tarball. Alternatively you can add a compatible version in a .tarball-version - file at the top of the source tree, wipe your autom4te.cache dir and generated - configure, and rerun autogen.sh. -diff --git a/docker/Dockerfile b/docker/Dockerfile -new file mode 100644 -index 00000000..6ac9480c ---- /dev/null -+++ b/docker/Dockerfile -@@ -0,0 +1,34 @@ -+FROM opensuse/leap:15.5 -+ -+RUN zypper in -y \ -+ git \ -+ autoconf \ -+ automake \ -+ libtool \ -+ make \ -+ gcc \ -+ libcorosync-devel \ -+ libxslt1 \ -+ libxslt-tools \ -+ python3-devel \ -+ python3-httplib2 \ -+ python3-pexpect \ -+ python3-pycurl \ -+ python3-requests \ -+ python3-suds-jurko \ -+ python3-openwsman \ -+ python3-boto3 \ -+ python3-novaclient \ -+ python3-keystoneclient \ -+ mozilla-nss-devel \ -+ mozilla-nspr-devel \ -+ libvirt-devel \ -+ libxml2-devel \ -+ flex \ -+ bison \ -+ libuuid-devel \ -+ systemd -+ -+WORKDIR /code -+VOLUME /code -+ENTRYPOINT ["./docker/entrypoint.sh"] -diff --git a/docker/README.md b/docker/README.md -new file mode 100644 -index 00000000..2aef7421 ---- /dev/null -+++ b/docker/README.md -@@ -0,0 +1,10 @@ -+# Dockerfile to build the fence-agents locally -+ -+Usage is as follows: -+ -+``` -+podman build -f docker/Dockerfile -t fence-agents:main . -+podman run -it -v $PWD:/code --rm localhost/fence-agents:main -+``` -+ -+In case you are running docker replace `podman` with `docker` and it should work the same. -diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh -new file mode 100755 -index 00000000..caa778e2 ---- /dev/null -+++ b/docker/entrypoint.sh -@@ -0,0 +1,8 @@ -+#!/usr/bin/bash -+ -+echo "### Running autogen" -+./autogen.sh -+echo "### Running configure" -+./configure -+echo "### Running make" -+make -diff --git a/fence-agents.spec.in b/fence-agents.spec.in -index b6af20d9..343f1c1a 100644 ---- a/fence-agents.spec.in -+++ b/fence-agents.spec.in -@@ -55,6 +55,7 @@ fence-agents-docker \\ - fence-agents-drac \\ - fence-agents-drac5 \\ - fence-agents-eaton-snmp \\ -+fence-agents-eaton-ssh \\ - fence-agents-ecloud \\ - fence-agents-emerson \\ - fence-agents-eps \\ -@@ -631,6 +632,18 @@ via the SNMP protocol. - %{_sbindir}/fence_eaton_snmp - %{_mandir}/man8/fence_eaton_snmp.8* - -+%package eaton-ssh -+License: GPL-2.0-or-later AND LGPL-2.0-or-later -+Summary: Fence agent for Eaton network power switches -+Requires: fence-agents-common = %{version}-%{release} -+BuildArch: noarch -+%description eaton-ssh -+Fence agent for Eaton network power switches that are accessed -+via the serial protocol tunnel over SSH. -+%files eaton-ssh -+%{_sbindir}/fence_eaton_ssh -+%{_mandir}/man8/fence_eaton_ssh.8* -+ - %package ecloud - License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for eCloud and eCloud VPC -diff --git a/tests/data/metadata/fence_eaton_ssh.xml b/tests/data/metadata/fence_eaton_ssh.xml -new file mode 100644 -index 00000000..a3be1ac6 ---- /dev/null -+++ b/tests/data/metadata/fence_eaton_ssh.xml -@@ -0,0 +1,206 @@ -+ -+ -+fence_eaton_ssh is a fence agent that connects to Eaton ePDU devices. It logs into device via ssh and reboot a specified outlet. -+https://www.eaton.com/ -+ -+ -+ -+ -+ Fencing action -+ -+ -+ -+ -+ Force Python regex for command prompt -+ -+ -+ -+ -+ Force Python regex for command prompt -+ -+ -+ -+ Identity file (private key) for SSH -+ -+ -+ -+ -+ Forces agent to use IPv4 addresses only -+ -+ -+ -+ -+ Forces agent to use IPv6 addresses only -+ -+ -+ -+ -+ IP address or hostname of fencing device -+ -+ -+ -+ -+ IP address or hostname of fencing device -+ -+ -+ -+ -+ TCP/UDP port to use for connection with device -+ -+ -+ -+ -+ Login name -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ Script to run to retrieve password -+ -+ -+ -+ -+ Login password or passphrase -+ -+ -+ -+ -+ Script to run to retrieve password -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Physical plug number on device, UUID or identification of machine -+ -+ -+ -+ -+ Use SSH connection -+ -+ -+ -+ -+ Use SSH connection -+ -+ -+ -+ -+ SSH options to use -+ -+ -+ -+ -+ Login name -+ -+ -+ -+ -+ Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog. -+ -+ -+ -+ -+ Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity. -+ -+ -+ -+ -+ Level of debugging detail in output. Defaults to the number of --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin). -+ -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ Write debug information to given file -+ -+ -+ -+ -+ Display version information and exit -+ -+ -+ -+ -+ Display help and exit -+ -+ -+ -+ -+ Separator for plug parameter when specifying more than 1 plug -+ -+ -+ -+ -+ Separator for CSV created by 'list' operation -+ -+ -+ -+ -+ Wait X seconds before fencing is started -+ -+ -+ -+ -+ Disable timeout (true/false) (default: true when run from Pacemaker 2.0+) -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after login -+ -+ -+ -+ -+ Test X seconds for status change after ON/OFF -+ -+ -+ -+ -+ Wait X seconds after issuing ON/OFF -+ -+ -+ -+ -+ Wait X seconds for cmd prompt after issuing command -+ -+ -+ -+ -+ Sleep X seconds between status calls during a STONITH action -+ -+ -+ -+ -+ Count of attempts to retry power on -+ -+ -+ -+ Path to ssh binary -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.25.1 - diff --git a/backport-fence_ibm_powervs-improved-performance.patch b/backport-fence_ibm_powervs-improved-performance.patch deleted file mode 100644 index b3989e491d1b734be07e8da8ad51b743b69c4fd8..0000000000000000000000000000000000000000 --- a/backport-fence_ibm_powervs-improved-performance.patch +++ /dev/null @@ -1,175 +0,0 @@ -From 7bb38c16a32dd842011337b58ab52631957b9adc Mon Sep 17 00:00:00 2001 -From: Andreas Schauberer <74912604+andscha@users.noreply.github.com> -Date: Mon, 19 Jun 2023 10:05:37 +0200 -Subject: [PATCH 13/46] fence_ibm_powervs: improved performance (#542) - -* fence_ibm_powervs: improved performance - -fence_ibm_powervs: improved performance -- improved performance using less power-iaas.cloud.ibm.com API calls -- add support for reboot_cycle, method to fence (onoff|cycle) (Default: onoff) - -Addressed comments by oalbrigt in ClusterLabs #PR542 -- you can use if options["--verbose-level"] > 1: to only print it when -vv or more or verbose_level is set to 2 or higher. ---- - agents/ibm_powervs/fence_ibm_powervs.py | 70 +++++++++++++++++------ - tests/data/metadata/fence_ibm_powervs.xml | 8 +++ - 2 files changed, 59 insertions(+), 19 deletions(-) - -diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py -index 18389361..e65462cb 100755 ---- a/agents/ibm_powervs/fence_ibm_powervs.py -+++ b/agents/ibm_powervs/fence_ibm_powervs.py -@@ -12,6 +12,8 @@ from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS - state = { - "ACTIVE": "on", - "SHUTOFF": "off", -+ "HARD_REBOOT": "on", -+ "SOFT_REBOOT": "on", - "ERROR": "unknown" - } - -@@ -37,21 +39,30 @@ def get_list(conn, options): - return outlets - - for r in res["pvmInstances"]: -- if "--verbose" in options: -+ if options["--verbose-level"] > 1: - logging.debug(json.dumps(r, indent=2)) - outlets[r["pvmInstanceID"]] = (r["serverName"], state[r["status"]]) - - return outlets - - def get_power_status(conn, options): -+ outlets = {} -+ logging.debug("Info: getting power status for LPAR " + options["--plug"] + " instance " + options["--instance"]) - try: - command = "cloud-instances/{}/pvm-instances/{}".format( - options["--instance"], options["--plug"]) - res = send_command(conn, command) -- result = get_list(conn, options)[options["--plug"]][1] -+ outlets[res["pvmInstanceID"]] = (res["serverName"], state[res["status"]]) -+ if options["--verbose-level"] > 1: -+ logging.debug(json.dumps(res, indent=2)) -+ result = outlets[options["--plug"]][1] -+ logging.debug("Info: Status: {}".format(result)) - except KeyError as e: -- logging.debug("Failed: Unable to get status for {}".format(e)) -- fail(EC_STATUS) -+ try: -+ result = get_list(conn, options)[options["--plug"]][1] -+ except KeyError as ex: -+ logging.debug("Failed: Unable to get status for {}".format(ex)) -+ fail(EC_STATUS) - - return result - -@@ -61,6 +72,7 @@ def set_power_status(conn, options): - "off" : '{"action" : "immediate-shutdown"}', - }[options["--action"]] - -+ logging.debug("Info: set power status to " + options["--action"] + " for LPAR " + options["--plug"] + " instance " + options["--instance"]) - try: - send_command(conn, "cloud-instances/{}/pvm-instances/{}/action".format( - options["--instance"], options["--plug"]), "POST", action) -@@ -68,6 +80,25 @@ def set_power_status(conn, options): - logging.debug("Failed: Unable to set power to {} for {}".format(options["--action"], e)) - fail(EC_STATUS) - -+def reboot_cycle(conn, options): -+ action = { -+ "reboot" : '{"action" : "hard-reboot"}', -+ }[options["--action"]] -+ -+ logging.debug("Info: start reboot cycle with action " + options["--action"] + " for LPAR " + options["--plug"] + " instance " + options["--instance"]) -+ try: -+ send_command(conn, "cloud-instances/{}/pvm-instances/{}/action".format( -+ options["--instance"], options["--plug"]), "POST", action) -+ except Exception as e: -+ result = get_power_status(conn, options) -+ logging.debug("Info: Status {}".format(result)) -+ if result == "off": -+ return True -+ else: -+ logging.debug("Failed: Unable to cycle with {} for {}".format(options["--action"], e)) -+ fail(EC_STATUS) -+ return True -+ - def connect(opt, token): - conn = pycurl.Curl() - -@@ -200,21 +231,21 @@ def define_new_opts(): - "order" : 0 - } - all_opt["api-type"] = { -- "getopt" : ":", -- "longopt" : "api-type", -- "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'", -- "required" : "0", -- "shortdesc" : "API-type (public|private)", -- "order" : 0 -- } -+ "getopt" : ":", -+ "longopt" : "api-type", -+ "help" : "--api-type=[public|private] API-type: 'public' (default) or 'private'", -+ "required" : "0", -+ "shortdesc" : "API-type (public|private)", -+ "order" : 0 -+ } - all_opt["proxy"] = { -- "getopt" : ":", -- "longopt" : "proxy", -- "help" : "--proxy=[http://:] Proxy: 'http://:'", -- "required" : "0", -- "shortdesc" : "Network proxy", -- "order" : 0 -- } -+ "getopt" : ":", -+ "longopt" : "proxy", -+ "help" : "--proxy=[http://:] Proxy: 'http://:'", -+ "required" : "0", -+ "shortdesc" : "Network proxy", -+ "order" : 0 -+ } - - - def main(): -@@ -227,6 +258,7 @@ def main(): - "proxy", - "port", - "no_password", -+ "method", - ] - - atexit.register(atexit_handler) -@@ -259,7 +291,7 @@ used with IBM PowerVS to fence virtual machines.""" - conn = connect(options, token) - atexit.register(disconnect, conn) - -- result = fence_action(conn, options, set_power_status, get_power_status, get_list) -+ result = fence_action(conn, options, set_power_status, get_power_status, get_list, reboot_cycle) - - sys.exit(result) - -diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml -index 79878a9a..7bdee4e2 100644 ---- a/tests/data/metadata/fence_ibm_powervs.xml -+++ b/tests/data/metadata/fence_ibm_powervs.xml -@@ -43,6 +43,14 @@ - - Fencing action - -+ -+ -+ -+ -+ Method to fence -+ - - - --- -2.25.1 - diff --git a/backport-fence_scsi-Add-support-for-space-separated-devices-and-update-in-meta-data.patch b/backport-fence_scsi-Add-support-for-space-separated-devices-and-update-in-meta-data.patch deleted file mode 100644 index a098bdade7c1caa7f6eaeaf7fb778ab655e2f781..0000000000000000000000000000000000000000 --- a/backport-fence_scsi-Add-support-for-space-separated-devices-and-update-in-meta-data.patch +++ /dev/null @@ -1,95 +0,0 @@ -From e363e55169a7be1cbeac5568fe2a32692867d4c6 Mon Sep 17 00:00:00 2001 -From: Arslan Ahmad -Date: Thu, 4 May 2023 12:55:41 +0530 -Subject: [PATCH 08/46] fence_scsi: Add support for space-separated devices and - update in meta-data - -Currently the devices associated with fence_scsi should be -comma-separated. With this commit, fence_scsi will also work if the -'devices' are space-separated. - -Additionally, this commit includes meta-data update: -1. For fence_scsi: - - The 'devices' parameter is optional if the cluster is configured with -clvm/lvmlock. - - The 'devices' parameter can be comma or space-separated. - -2. For fence_mpath: - - The 'devices' parameter can be comma or space-separated. ---- - agents/mpath/fence_mpath.py | 2 +- - agents/scsi/fence_scsi.py | 8 ++++---- - tests/data/metadata/fence_mpath.xml | 2 +- - tests/data/metadata/fence_scsi.xml | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index ee81eab3..6976fee9 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -226,7 +226,7 @@ def define_new_opts(): - "help" : "-d, --devices=[devices] List of devices to use for current operation", - "required" : "0", - "shortdesc" : "List of devices to use for current operation. Devices can \ --be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). \ -+be comma or space separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). \ - Each device must support SCSI-3 persistent reservations.", - "order": 1 - } -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 3de4ba0b..42530ceb 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -350,8 +350,8 @@ def define_new_opts(): - "help" : "-d, --devices=[devices] List of devices to use for current operation", - "required" : "0", - "shortdesc" : "List of devices to use for current operation. Devices can \ --be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 \ --persistent reservations.", -+be comma or space separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 \ -+persistent reservations. Optional if cluster is configured with clvm or lvmlockd.", - "order": 1 - } - all_opt["nodename"] = { -@@ -612,10 +612,10 @@ failing." - - options["--key"] = options["--key"].lstrip('0') - -- if not ("--devices" in options and options["--devices"].split(",")): -+ if not ("--devices" in options and [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]): - options["devices"] = get_shared_devices(options) - else: -- options["devices"] = options["--devices"].split(",") -+ options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d] - - if not options["devices"]: - fail_usage("Failed: No devices found") -diff --git a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml -index e22d3a1f..262956dc 100644 ---- a/tests/data/metadata/fence_mpath.xml -+++ b/tests/data/metadata/fence_mpath.xml -@@ -14,7 +14,7 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - - -- List of devices to use for current operation. Devices can be comma-separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. -+ List of devices to use for current operation. Devices can be comma or space separated list of device-mapper multipath devices (eg. /dev/mapper/3600508b400105df70000e00000ac0000 or /dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations. - - - -diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml -index 4fa86189..facb2f52 100644 ---- a/tests/data/metadata/fence_scsi.xml -+++ b/tests/data/metadata/fence_scsi.xml -@@ -19,7 +19,7 @@ When used as a watchdog device you can define e.g. retry=1, retry-sleep=2 and ve - - - -- List of devices to use for current operation. Devices can be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations. -+ List of devices to use for current operation. Devices can be comma or space separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations. Optional if cluster is configured with clvm or lvmlockd. - - - --- -2.25.1 - diff --git a/backport-fence_scsi-Automatically-detect-devices-for-shared-VGs.patch b/backport-fence_scsi-Automatically-detect-devices-for-shared-VGs.patch deleted file mode 100644 index 3cc45801d02d6fbc5747d2a6e526fdfcbef7ffab..0000000000000000000000000000000000000000 --- a/backport-fence_scsi-Automatically-detect-devices-for-shared-VGs.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 4661b6f625c57a728ec58023da89ba378d4d1c27 Mon Sep 17 00:00:00 2001 -From: Arslan Ahmad -Date: Mon, 17 Apr 2023 15:59:49 +0530 -Subject: [PATCH 06/46] fence_scsi: Automatically detect devices for shared VGs - -Currently, if no devices option is given, fence_scsi automatically -builds a device list containing all LVM PVs that back VGs with the -clustered ('c') bit set. With this commit, fence_scsi will also consider -VGs with the shared ('s') bit set. - -Additionally, the existing check is too broad. We should consider a -volume group to be clustered or shared only if the 6th bit is set to 'c' -or 's'. This way, we can avoid false positives. - -Closes RHBZ#2187327 -Closes RHBZ#2187329 ---- - agents/scsi/fence_scsi.py | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 85e4f29e..3de4ba0b 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -314,7 +314,7 @@ def dev_read(fail=True, opt=None): - return devs - - --def get_clvm_devices(options): -+def get_shared_devices(options): - devs = [] - cmd = options["--vgs-path"] + " " +\ - "--noheadings " +\ -@@ -324,10 +324,11 @@ def get_clvm_devices(options): - "--config 'global { locking_type = 0 } devices { preferred_names = [ \"^/dev/dm\" ] }'" - out = run_cmd(options, cmd) - if out["rc"]: -- fail_usage("Failed: Cannot get clvm devices") -- for line in out["out"].split("\n"): -- if 'c' in line.split(":")[0]: -- devs.append(line.split(":")[1]) -+ fail_usage("Failed: Cannot get shared devices") -+ for line in out["out"].splitlines(): -+ vg_attr, pv_name = line.strip().split(":") -+ if vg_attr[5] in "cs": -+ devs.append(pv_name) - return devs - - -@@ -612,7 +613,7 @@ failing." - options["--key"] = options["--key"].lstrip('0') - - if not ("--devices" in options and options["--devices"].split(",")): -- options["devices"] = get_clvm_devices(options) -+ options["devices"] = get_shared_devices(options) - else: - options["devices"] = options["--devices"].split(",") - --- -2.25.1 - diff --git a/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch b/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch deleted file mode 100644 index a5be3e7ca2009b9438958628721317fac7b155e5..0000000000000000000000000000000000000000 --- a/backport-fencing-add-error-message-for-EC_GENERIC_ERROR.patch +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 8c79a32640f559438f82b1bdae44065b42bbe84a..0000000000000000000000000000000000000000 --- a/backport-fencing-use-EC_OK.patch +++ /dev/null @@ -1,49 +0,0 @@ -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/backport-fixes-to-allow-running-outside-of-AWS-network.patch b/backport-fixes-to-allow-running-outside-of-AWS-network.patch deleted file mode 100644 index 666966b0d61270b0e850af54683acc9124fea77d..0000000000000000000000000000000000000000 --- a/backport-fixes-to-allow-running-outside-of-AWS-network.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 73fdae1b9da5aa1ba1d371dcc47fe31a4d22bb31 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Thu, 30 Mar 2023 12:20:05 +0200 -Subject: [PATCH] fence_aws: fixes to allow running outside of AWS network - -- add --skip-race-check parameter to allow running outside of AWS - network e.g. for openshift -- fixed and improved logging logic -- use --debug-file parameter for file logging - -Reference:https://github.com/ClusterLabs/fence-agents/pull/534/commits/73fdae1b9da5aa1ba1d371dcc47fe31a4d22bb31 ---- - agents/aws/fence_aws.py | 50 ++++++++++++++++++++----------- - tests/data/metadata/fence_aws.xml | 5 ++++ - 2 files changed, 37 insertions(+), 18 deletions(-) - -diff --git a/agents/aws/fence_aws.py b/agents/aws/fence_aws.py -index c947bf29c..5d1677144 100644 ---- a/agents/aws/fence_aws.py -+++ b/agents/aws/fence_aws.py -@@ -16,13 +16,13 @@ - except ImportError: - pass - --logger = logging.getLogger("fence_aws") -+logger = logging.getLogger() - logger.propagate = False - logger.setLevel(logging.INFO) - logger.addHandler(SyslogLibHandler()) - logging.getLogger('botocore.vendored').propagate = False - --def get_instance_id(): -+def get_instance_id(options): - try: - token = requests.put('http://169.254.169.254/latest/api/token', headers={"X-aws-ec2-metadata-token-ttl-seconds" : "21600"}).content.decode("UTF-8") - r = requests.get('http://169.254.169.254/latest/meta-data/instance-id', headers={"X-aws-ec2-metadata-token" : token}).content.decode("UTF-8") -@@ -30,12 +30,15 @@ def get_instance_id(): - except HTTPError as http_err: - logger.error('HTTP error occurred while trying to access EC2 metadata server: %s', http_err) - except Exception as err: -- logger.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ if "--skip-race-check" not in options: -+ logger.error('A fatal error occurred while trying to access EC2 metadata server: %s', err) -+ else: -+ logger.debug('A fatal error occurred while trying to access EC2 metadata server: %s', err) - return None -- -+ - - def get_nodes_list(conn, options): -- logger.info("Starting monitor operation") -+ logger.debug("Starting monitor operation") - result = {} - try: - if "--filter" in options: -@@ -63,7 +66,7 @@ def get_power_status(conn, options): - try: - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [options["--plug"]]}]) - state = list(instance)[0].state["Name"] -- logger.info("Status operation for EC2 instance %s returned state: %s",options["--plug"],state.upper()) -+ logger.debug("Status operation for EC2 instance %s returned state: %s",options["--plug"],state.upper()) - if state == "running": - return "on" - elif state == "stopped": -@@ -78,7 +81,7 @@ def get_power_status(conn, options): - except IndexError: - fail(EC_STATUS) - except Exception as e: -- logging.error("Failed to get power status: %s", e) -+ logger.error("Failed to get power status: %s", e) - fail(EC_STATUS) - - def get_self_power_status(conn, instance_id): -@@ -86,10 +89,10 @@ def get_self_power_status(conn, instance_id): - instance = conn.instances.filter(Filters=[{"Name": "instance-id", "Values": [instance_id]}]) - state = list(instance)[0].state["Name"] - if state == "running": -- logging.debug("Captured my (%s) state and it %s - returning OK - Proceeding with fencing",instance_id,state.upper()) -+ logger.debug("Captured my (%s) state and it %s - returning OK - Proceeding with fencing",instance_id,state.upper()) - return "ok" - else: -- logging.debug("Captured my (%s) state it is %s - returning Alert - Unable to fence other nodes",instance_id,state.upper()) -+ logger.debug("Captured my (%s) state it is %s - returning Alert - Unable to fence other nodes",instance_id,state.upper()) - return "alert" - - except ClientError: -@@ -100,18 +103,18 @@ def get_self_power_status(conn, instance_id): - return "fail" - - def set_power_status(conn, options): -- my_instance = get_instance_id() -+ my_instance = get_instance_id(options) - try: - if (options["--action"]=="off"): -- if (get_self_power_status(conn,my_instance) == "ok"): -+ if "--skip-race-check" in options or get_self_power_status(conn,my_instance) == "ok": - conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True) -- logger.info("Called StopInstance API call for %s", options["--plug"]) -+ logger.debug("Called StopInstance API call for %s", options["--plug"]) - else: -- logger.info("Skipping fencing as instance is not in running status") -+ logger.debug("Skipping fencing as instance is not in running status") - elif (options["--action"]=="on"): - conn.instances.filter(InstanceIds=[options["--plug"]]).start() - except Exception as e: -- logger.error("Failed to power %s %s: %s", \ -+ logger.debug("Failed to power %s %s: %s", \ - options["--action"], options["--plug"], e) - - def define_new_opts(): -@@ -156,12 +159,20 @@ def define_new_opts(): - "default": "False", - "order": 6 - } -+ all_opt["skip_race_check"] = { -+ "getopt" : "", -+ "longopt" : "skip-race-check", -+ "help" : "--skip-race-check Skip race condition check", -+ "shortdesc": "Skip race condition check", -+ "required": "0", -+ "order": 7 -+ } - - # Main agent method - def main(): - conn = None - -- device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug"] -+ device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check"] - - atexit.register(atexit_handler) - -@@ -183,12 +194,15 @@ def main(): - - run_delay(options) - -- if options.get("--verbose") is not None: -- lh = logging.FileHandler('/var/log/fence_aws_debug.log') -+ if "--debug-file" in options: -+ for handler in logger.handlers: -+ if isinstance(handler, logging.FileHandler): -+ logger.removeHandler(handler) -+ lh = logging.FileHandler(options["--debug-file"]) - logger.addHandler(lh) - lhf = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') - lh.setFormatter(lhf) -- logger.setLevel(logging.DEBUG) -+ lh.setLevel(logging.DEBUG) - - if options["--boto3_debug"].lower() not in ["1", "yes", "on", "true"]: - boto3.set_stream_logger('boto3',logging.INFO) -diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml -index 76995ecf2..32de4418a 100644 ---- a/tests/data/metadata/fence_aws.xml -+++ b/tests/data/metadata/fence_aws.xml -@@ -46,6 +46,11 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht - - Boto Lib debug - -+ -+ -+ -+ Skip race condition check -+ - - - diff --git a/backport-spec-Migrate-to-SPDX-license.patch b/backport-spec-Migrate-to-SPDX-license.patch deleted file mode 100644 index 36e4deb67d3a21b0b877db1863231017a5ea90de..0000000000000000000000000000000000000000 --- a/backport-spec-Migrate-to-SPDX-license.patch +++ /dev/null @@ -1,644 +0,0 @@ -From 6e41bc2e69a9b5395c7d0c48aa2fc5424365f8d1 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Tue, 6 Jun 2023 18:08:00 +0200 -Subject: [PATCH 11/46] spec: Migrate to SPDX license - -Both Fedora and openSUSE now recommends to use SPDX shortname format for -License. - -This work is 1:1 based on Fedora patch made by Antonio Torres - and he should get all credit. - -Signed-off-by: Jan Friesse ---- - fence-agents.spec.in | 138 +++++++++++++++++++++---------------------- - 1 file changed, 69 insertions(+), 69 deletions(-) - -diff --git a/fence-agents.spec.in b/fence-agents.spec.in -index 38296937..b6af20d9 100644 ---- a/fence-agents.spec.in -+++ b/fence-agents.spec.in -@@ -19,7 +19,7 @@ Name: fence-agents - Summary: Set of unified programs capable of host isolation ("fencing") - Version: @version@ - Release: @specver@%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Group: System Environment/Base - URL: https://github.com/ClusterLabs/fence-agents - Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.bz2 -@@ -256,7 +256,7 @@ network, storage, or similar. They operate through a unified interface - (calling conventions) devised for the original Red Hat clustering solution. - - %package common --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Common base for Fence Agents - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pexpect python3-pycurl -@@ -293,7 +293,7 @@ This package contains support files including the Python fencing library. - %endif - - %package all --License: GPLv2+ and LGPLv2+ and ASL 2.0 -+License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 - Summary: Set of unified programs capable of host isolation ("fencing") - Requires: %{allfenceagents} - Provides: fence-agents = %{version}-%{release} -@@ -308,7 +308,7 @@ This package serves as a catch-all for all supported fence agents. - - %ifarch x86_64 - %package aliyun --License: GPLv2+ and LGPLv2+ and ASL 2.0 and BSD and MIT -+License: GPL-2.0-or-later AND LGPL-2.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT - Group: System Environment/Base - Summary: Fence agent for Alibaba Cloud (Aliyun) - Requires: fence-agents-common >= %{version}-%{release} -@@ -323,7 +323,7 @@ The fence-agents-aliyun package contains a fence agent for Alibaba Cloud (Aliyun - %endif - - %package alom --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for SUN ALOM - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -342,7 +342,7 @@ Fence agent for SUN ALOM. - %{_mandir}/man8/fence_alom.8* - - %package amt --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Intel AMT devices - Requires: amtterm - Requires: fence-agents-common = %{version}-%{release} -@@ -355,7 +355,7 @@ Fence agent for AMT compatibile devices that are accessed via - %{_mandir}/man8/fence_amt.8* - - %package amt-ws --License: ASL 2.0 -+License: Apache-2.0 - Summary: Fence agent for Intel AMT (WS-Man) devices - Requires: fence-agents-common = %{version}-%{release} - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} -@@ -376,7 +376,7 @@ Fence agent for AMT (WS-Man) devices. - %{_mandir}/man8/fence_amt_ws.8* - - %package apc --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for APC devices - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -395,7 +395,7 @@ Fence agent for APC devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_apc.8* - - %package apc-snmp --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agents for APC devices (SNMP) - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -410,7 +410,7 @@ Fence agents for APC devices that are accessed via the SNMP protocol. - - %if ! %{defined rhel7_s390x} - %package aws --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Amazon AWS - Requires: fence-agents-common = %{version}-%{release} - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} -@@ -428,7 +428,7 @@ Fence agent for Amazon AWS instances. - %endif - - %package azure-arm --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Azure Resource Manager - Requires: fence-agents-common = %{version}-%{release} - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} -@@ -457,7 +457,7 @@ Fence agent for Azure Resource Manager instances. - %{_mandir}/man8/fence_azure_arm.8* - - %package bladecenter --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM BladeCenter - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -477,7 +477,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_bladecenter.8* - - %package brocade --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Brocade switches - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -496,7 +496,7 @@ Fence agent for Brocade devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_brocade.8* - - %package cdu --License: GPLv3-only -+License: GPL-3.0-only - Summary: Fence agent for a Sentry Switch CDU - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -507,7 +507,7 @@ Fence agent for Sentry Switch CDU power switch. - %{_mandir}/man8/fence_cdu.8* - - %package cisco-mds --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Cisco MDS 9000 series - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -520,7 +520,7 @@ via the SNMP protocol. - %{_mandir}/man8/fence_cisco_mds.8* - - %package cisco-ucs --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Cisco UCS series - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pycurl -@@ -538,7 +538,7 @@ via the SNMP protocol. - - %ifarch x86_64 ppc64le - %package compute --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Nova compute nodes - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-requests -@@ -559,7 +559,7 @@ Fence agent for Nova compute nodes. - %endif - - %package cyberpower-ssh --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for CyberPower network PDUs - Requires: openssh-clients - Requires: fence-agents-common = %{version}-%{release} -@@ -570,7 +570,7 @@ BuildArch: noarch - %{_mandir}/man8/fence_cyberpower_ssh.8* - - %package docker --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Docker - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pycurl -@@ -586,7 +586,7 @@ Fence agent for Docker images that are accessed over HTTP. - %{_mandir}/man8/fence_docker.8* - - %package drac --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Dell DRAC - Requires: telnet - Requires: fence-agents-common = %{version}-%{release} -@@ -599,7 +599,7 @@ via telnet. - %{_mandir}/man8/fence_drac.8* - - %package drac5 --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Dell DRAC 5 - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -619,7 +619,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_drac5.8* - - %package eaton-snmp --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Eaton network power switches - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -632,7 +632,7 @@ via the SNMP protocol. - %{_mandir}/man8/fence_eaton_snmp.8* - - %package ecloud --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for eCloud and eCloud VPC - Requires: python3-requests - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} -@@ -649,7 +649,7 @@ Fence agent for eCloud and eCloud VPC from ANS Group Limited - %{_mandir}/man8/fence_ecloud.8* - - %package emerson --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Emerson devices (SNMP) - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -661,7 +661,7 @@ the SNMP protocol. - %{_mandir}/man8/fence_emerson.8* - - %package eps --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for ePowerSwitch 8M+ power switches - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -674,7 +674,7 @@ via the HTTP(s) protocol. - - %if ! %{defined rhel7_s390x} - %package gce --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for GCE (Google Cloud Engine) - Requires: fence-agents-common = %{version}-%{release} - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} -@@ -697,7 +697,7 @@ Fence agent for GCE (Google Cloud Engine) instances. - %endif - - %package hds-cb --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Hitachi Compute Blade systems - Requires: telnet - Requires: fence-agents-common = %{version}-%{release} -@@ -709,7 +709,7 @@ Fence agent for Hitachi Compute Blades that are accessed via telnet. - %{_mandir}/man8/fence_hds_cb.8* - - %package heuristics-ping --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Pseudo fence agent to affect other agents based on ping-heuristics - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -722,7 +722,7 @@ ping-heuristics. - %{_mandir}/man8/fence_heuristics_ping.8* - - %package hpblade --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for HP BladeSystem devices - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -742,7 +742,7 @@ or SSH. - %{_mandir}/man8/fence_hpblade.8* - - %package ibmblade --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM BladeCenter - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -755,7 +755,7 @@ via the SNMP protocol. - %{_mandir}/man8/fence_ibmblade.8* - - %package ibmz --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM z LPARs - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-requests -@@ -772,7 +772,7 @@ Web Services REST API. - %{_mandir}/man8/fence_ibmz.8* - - %package ibm-powervs --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM PowerVS - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -783,7 +783,7 @@ Fence agent for IBM PowerVS that are accessed via REST API. - %{_mandir}/man8/fence_ibm_powervs.8* - - %package ibm-vpc --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM Cloud VPC - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -794,7 +794,7 @@ Fence agent for IBM Cloud VPC that are accessed via REST API. - %{_mandir}/man8/fence_ibm_vpc.8* - - %package ifmib --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for devices with IF-MIB interfaces - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -807,7 +807,7 @@ the SNMP protocol. - %{_mandir}/man8/fence_ifmib.8* - - %package ilo2 --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agents for HP iLO2 devices - Requires: gnutls-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -822,7 +822,7 @@ the HTTP(s) protocol. - %{_mandir}/man8/fence_ilo2.8* - - %package ilo-moonshot --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for HP iLO Moonshot devices - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -842,7 +842,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_ilo_moonshot.8* - - %package ilo-mp --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for HP iLO MP devices - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -861,7 +861,7 @@ Fence agent for HP iLO MP devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_ilo_mp.8* - - %package ilo-ssh --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agents for HP iLO devices over SSH - Requires: openssh-clients - Requires: fence-agents-common = %{version}-%{release} -@@ -879,7 +879,7 @@ Fence agents for HP iLO devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_ilo5_ssh.8* - - %package intelmodular --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for devices with Intel Modular interfaces - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -892,7 +892,7 @@ via the SNMP protocol. - %{_mandir}/man8/fence_intelmodular.8* - - %package ipdu --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM iPDU network power switches - Requires: net-snmp-utils - Requires: fence-agents-common = %{version}-%{release} -@@ -905,7 +905,7 @@ via the SNMP protocol. - %{_mandir}/man8/fence_ipdu.8* - - %package ipmilan --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agents for devices with IPMI interface - Requires: /usr/bin/ipmitool - Requires: fence-agents-common = %{version}-%{release} -@@ -930,7 +930,7 @@ Fence agents for devices with IPMI interface. - - %ifarch x86_64 ppc64le - %package ironic --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for OpenStack's Ironic (Bare Metal as a service) - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -942,7 +942,7 @@ Fence agent for OpenStack's Ironic (Bare Metal as a service) service. - %endif - - %package kdump --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for use with kdump crash recovery service - Requires: fence-agents-common = %{version}-%{release} - # this cannot be noarch since it's compiled -@@ -955,7 +955,7 @@ Fence agent for use with kdump crash recovery service. - %{_mandir}/man8/fence_kdump_send.8* - - %package kubevirt --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for KubeVirt platform - Requires: python3-openshift >= 0.12.1 - Requires: fence-agents-common = %{version}-%{release} -@@ -967,7 +967,7 @@ Fence agent for KubeVirt platform. - %{_mandir}/man8/fence_kubevirt.8* - - %package ldom --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Sun LDom virtual machines - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -986,7 +986,7 @@ Fence agent for APC devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_ldom.8* - - %package lpar --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM LPAR - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -1005,7 +1005,7 @@ Fence agent for IBM LPAR devices that are accessed via telnet or SSH. - %{_mandir}/man8/fence_lpar.8* - - %package mpath --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for reservations over Device Mapper Multipath - Requires: device-mapper-multipath - Requires: fence-agents-common = %{version}-%{release} -@@ -1019,7 +1019,7 @@ Device Mapper Multipath. - %{_mandir}/man8/fence_mpath.8* - - %package netio --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Koukaam NETIO devices - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -1040,7 +1040,7 @@ via telnet or SSH. - - %ifarch x86_64 ppc64le - %package openstack --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for OpenStack's Nova service - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-requests -@@ -1057,7 +1057,7 @@ Fence agent for OpenStack's Nova service. - %endif - - %package ovh --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for OVH provider - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - %if 0%{?suse_version} > 1500 -@@ -1078,7 +1078,7 @@ Fence agent for OVH hosting provider. - - # skipped from allfenceagents - %package pve --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for PVE - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pycurl -@@ -1095,7 +1095,7 @@ Fence agent for PVE. - - # skipped from allfenceagents - %package raritan --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Raritan Dominion PX - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -1107,7 +1107,7 @@ Fence agent for Raritan Dominion PX. - - # skipped from allfenceagents - %package rcd-serial --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for RCD serial - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -1118,7 +1118,7 @@ Fence agent for RCD serial. - %{_mandir}/man8/fence_rcd_serial.8* - - %package redfish --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Group: System Environment/Base - Summary: Fence agent for Redfish - Requires: fence-agents-common >= %{version}-%{release} -@@ -1136,7 +1136,7 @@ The fence-agents-redfish package contains a fence agent for Redfish - %{_mandir}/man8/fence_redfish.8* - - %package rhevm --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for RHEV-M - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -1147,7 +1147,7 @@ Fence agent for RHEV-M via REST API. - %{_mandir}/man8/fence_rhevm.8* - - %package rsa --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM RSA II - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -1167,7 +1167,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_rsa.8* - - %package rsb --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Fujitsu RSB - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -1187,7 +1187,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_rsb.8* - - %package sanbox2 --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for QLogic SANBox2 FC switches - Requires: telnet - Requires: fence-agents-common = %{version}-%{release} -@@ -1199,7 +1199,7 @@ Fence agent for QLogic SANBox2 switches that are accessed via telnet. - %{_mandir}/man8/fence_sanbox2.8* - - %package sbd --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for SBD (storage-based death) - Requires: sbd - Requires: fence-agents-common = %{version}-%{release} -@@ -1211,7 +1211,7 @@ Fence agent for SBD (storage-based death). - %{_mandir}/man8/fence_sbd.8* - - %package scsi --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for SCSI persistent reservations - Requires: sg3_utils - Requires: fence-agents-common = %{version}-%{release} -@@ -1225,7 +1225,7 @@ Fence agent for SCSI persistent reservations. - %{_mandir}/man8/fence_scsi.8* - - %package vbox --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for VirtualBox - Requires: openssh-clients - Requires: fence-agents-common = %{version}-%{release} -@@ -1238,7 +1238,7 @@ Fence agent for VirtualBox dom0 accessed via SSH. - - # skipped from allfenceagents - %package virsh --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for virtual machines based on libvirt - Requires: openssh-clients /usr/bin/virsh - Requires: fence-agents-common = %{version}-%{release} -@@ -1250,7 +1250,7 @@ Fence agent for virtual machines that are accessed via SSH. - %{_mandir}/man8/fence_virsh.8* - - %package vmware --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for VMWare with VI Perl Toolkit or vmrun - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pexpect -@@ -1266,7 +1266,7 @@ Fence agent for VMWare accessed with VI Perl Toolkit or vmrun. - %{_mandir}/man8/fence_vmware.8* - - %package vmware-rest --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for VMWare with REST API - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -1278,7 +1278,7 @@ Fence agent for VMWare with REST API. - %{_mandir}/man8/fence_vmware_rest.8* - - %package vmware-soap --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for VMWare with SOAP API v4.1+ - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - %if 0%{?suse_version} > 1500 -@@ -1298,7 +1298,7 @@ Fence agent for VMWare with SOAP API v4.1+. - %{_mandir}/man8/fence_vmware_soap.8* - - %package vmware-vcloud --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for VMWare vCloud Director - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch -@@ -1310,7 +1310,7 @@ Fence agent for VMWare vCloud Director. - %{_mandir}/man8/fence_vmware_vcloud.8* - - %package wti --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for WTI Network power switches - Requires: openssh-clients - %if 0%{?fedora} < 33 || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?centos} && 0%{?centos} < 9) || 0%{?suse_version} -@@ -1330,7 +1330,7 @@ via telnet or SSH. - %{_mandir}/man8/fence_wti.8* - - %package xenapi --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for Citrix XenServer over XenAPI - %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - Requires: python3-pexpect -@@ -1350,7 +1350,7 @@ Fence agent for Citrix XenServer accessed over XenAPI. - %{_mandir}/man8/fence_xenapi.8* - - %package zvm --License: GPLv2+ and LGPLv2+ -+License: GPL-2.0-or-later AND LGPL-2.0-or-later - Summary: Fence agent for IBM z/VM over IP - Requires: fence-agents-common = %{version}-%{release} - BuildArch: noarch --- -2.25.1 - diff --git a/fence-agents-4.12.1.tar.gz b/fence-agents-4.12.1.tar.gz deleted file mode 100644 index b44ed12e6387bf4cb1129c74124ab778b53b5c29..0000000000000000000000000000000000000000 Binary files a/fence-agents-4.12.1.tar.gz and /dev/null differ diff --git a/fence-agents-4.15.0.tar.gz b/fence-agents-4.15.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4cf5f258d0523506d620d84aee1f3be3e3a097ad Binary files /dev/null and b/fence-agents-4.15.0.tar.gz differ diff --git a/fence-agents.spec b/fence-agents.spec index b3618cc0a9f32ebff71f3bfb1e1127267b45870e..9093a7f77fa0dc3637c39f551547c2310a2ac321 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -5,34 +5,12 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") -Version: 4.12.1 -Release: 15 -License: GPL-2.0-or-later AND LGPL-2.0-or-later +Version: 4.15.0 +Release: 1 +License: GPL-2.0-or-later and LGPL-2.0-or-later Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents Source0: https://github.com/ClusterLabs/fence-agents/archive//v%{version}/%{name}-%{version}.tar.gz -Patch0: fence_ipmilan-fix-typo-in-description.patch -Patch1: fence_scsi-fix-registration-handling-if-ISID-conflic.patch -Patch2: fence_scsi-fix-registration-handling-in-device-off-workflows.patch -Patch3: backport-fixes-to-allow-running-outside-of-AWS-network.patch -Patch4: backport-fail-when-power-action-request-fails.patch -Patch5: backport-fence_scsi-Automatically-detect-devices-for-shared-VGs.patch -Patch6: backport-fence_scsi-Add-support-for-space-separated-devices-and-update-in-meta-data.patch -Patch7: backport-fence_azure_arm-add-stack-cloud-support.patch -Patch8: backport-azure_fence-use-correct-credential_scope-and-profile.patch -Patch9: backport-spec-Migrate-to-SPDX-license.patch -Patch10: backport-fence_eaton_ssh-new-fence-agent-for-Eaton-ePDU-G3-over-ssh.patch -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 -Patch17: backport-doc-add-fa-dev-guide.patch -Patch18: backport-doc-add-fa-dev-guide-to-README.patch -Patch19: backport-fa-dev-guide-add-General-git-section.patch -Patch20: backport-fa-dev-guide-add-reboot_cycle-section.patch -Patch21: backport-fa-dev-guide-improve-fail-error-code-description.patch # skipped: pve, raritan, rcd-serial, virsh %global allfenceagents %(cat <= %{version}-%{release} @@ -270,7 +250,7 @@ The fence-agents-aliyun package contains a fence agent for Alibaba Cloud (Aliyun %endif %package alom -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for SUN ALOM Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -282,7 +262,7 @@ Fence agent for SUN ALOM. %{_mandir}/man8/fence_alom.8* %package amt -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Intel AMT devices Requires: amtterm Requires: fence-agents-common = %{version}-%{release} @@ -307,7 +287,7 @@ The fence-agents-amt-ws package contains a fence agent for AMT (WS-Man) devices. %{_mandir}/man8/fence_amt_ws.8* %package apc -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for APC devices Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -319,7 +299,7 @@ Fence agent for APC devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_apc.8* %package apc-snmp -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agents for APC devices (SNMP) Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -333,7 +313,7 @@ Fence agents for APC devices that are accessed via the SNMP protocol. %{_mandir}/man8/fence_tripplite_snmp.8* %package aws -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Amazon AWS Requires: fence-agents-common = %{version}-%{release} Requires: python3-boto3 @@ -346,7 +326,7 @@ Fence agent for Amazon AWS instances. %{_mandir}/man8/fence_aws.8* %package bladecenter -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM BladeCenter Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -359,7 +339,7 @@ via telnet or SSH. %{_mandir}/man8/fence_bladecenter.8* %package brocade -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Brocade switches Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -382,7 +362,7 @@ Fence agent for Sentry Switch CDU power switch. %{_mandir}/man8/fence_cdu.8* %package cisco-mds -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Cisco MDS 9000 series Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -395,7 +375,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_cisco_mds.8* %package cisco-ucs -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Cisco UCS series Requires: python3-pycurl Requires: fence-agents-common = %{version}-%{release} @@ -409,7 +389,7 @@ via the SNMP protocol. %ifarch x86_64 %package compute -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Nova compute nodes Requires: python3-requests Requires: fence-agents-common = %{version}-%{release} @@ -424,7 +404,7 @@ Fence agent for Nova compute nodes. %endif %package cyberpower-ssh -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for CyberPower network PDUs Requires: openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -435,7 +415,7 @@ BuildArch: noarch %{_mandir}/man8/fence_cyberpower_ssh.8* %package docker -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Docker Requires: python3-pycurl Requires: fence-agents-common = %{version}-%{release} @@ -447,7 +427,7 @@ Fence agent for Docker images that are accessed over HTTP. %{_mandir}/man8/fence_docker.8* %package drac -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Dell DRAC Requires: telnet Requires: fence-agents-common = %{version}-%{release} @@ -460,7 +440,7 @@ via telnet. %{_mandir}/man8/fence_drac.8* %package drac5 -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Dell DRAC 5 Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -473,7 +453,7 @@ via telnet or SSH. %{_mandir}/man8/fence_drac5.8* %package eaton-snmp -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Eaton network power switches Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -486,7 +466,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_eaton_snmp.8* %package eaton-ssh -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Eaton network power switches Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -498,7 +478,7 @@ via the serial protocol tunnel over SSH. %{_mandir}/man8/fence_eaton_ssh.8* %package ecloud -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for eCloud and eCloud VPC Requires: python3-requests Requires: fence-agents-common = %{version}-%{release} @@ -510,7 +490,7 @@ Fence agent for eCloud and eCloud VPC from ANS Group Limited %{_mandir}/man8/fence_ecloud.8* %package emerson -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Emerson devices (SNMP) Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -522,7 +502,7 @@ the SNMP protocol. %{_mandir}/man8/fence_emerson.8* %package eps -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for ePowerSwitch 8M+ power switches Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -534,7 +514,7 @@ via the HTTP(s) protocol. %{_mandir}/man8/fence_eps.8* %package gce -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for GCE (Google Cloud Engine) Requires: fence-agents-common = %{version}-%{release} Requires: python3-google-api-client @@ -547,7 +527,7 @@ Fence agent for GCE (Google Cloud Engine) instances. %{_mandir}/man8/fence_gce.8* %package hds-cb -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Hitachi Compute Blade systems Requires: telnet Requires: fence-agents-common = %{version}-%{release} @@ -559,7 +539,7 @@ Fence agent for Hitachi Compute Blades that are accessed via telnet. %{_mandir}/man8/fence_hds_cb.8* %package heuristics-ping -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Pseudo fence agent to affect other agents based on ping-heuristics Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -572,7 +552,7 @@ ping-heuristics. %{_mandir}/man8/fence_heuristics_ping.8* %package hpblade -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for HP BladeSystem devices Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -585,7 +565,7 @@ or SSH. %{_mandir}/man8/fence_hpblade.8* %package ibmblade -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM BladeCenter Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -598,7 +578,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_ibmblade.8* %package ibmz -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM z LPARs Requires: python3-requests Requires: fence-agents-common = %{version}-%{release} @@ -611,7 +591,7 @@ Web Services REST API. %{_mandir}/man8/fence_ibmz.8* %package ibm-powervs -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM PowerVS Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -622,7 +602,7 @@ Fence agent for IBM PowerVS that are accessed via REST API. %{_mandir}/man8/fence_ibm_powervs.8* %package ibm-vpc -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM Cloud VPC Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -633,7 +613,7 @@ Fence agent for IBM Cloud VPC that are accessed via REST API. %{_mandir}/man8/fence_ibm_vpc.8* %package ifmib -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for devices with IF-MIB interfaces Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -646,7 +626,7 @@ the SNMP protocol. %{_mandir}/man8/fence_ifmib.8* %package ilo2 -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agents for HP iLO2 devices Requires: gnutls-utils Requires: fence-agents-common = %{version}-%{release} @@ -661,7 +641,7 @@ the HTTP(s) protocol. %{_mandir}/man8/fence_ilo2.8* %package ilo-moonshot -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for HP iLO Moonshot devices Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -674,7 +654,7 @@ via telnet or SSH. %{_mandir}/man8/fence_ilo_moonshot.8* %package ilo-mp -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for HP iLO MP devices Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -686,7 +666,7 @@ Fence agent for HP iLO MP devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_ilo_mp.8* %package ilo-ssh -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agents for HP iLO devices over SSH Requires: openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -704,7 +684,7 @@ Fence agents for HP iLO devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_ilo5_ssh.8* %package intelmodular -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for devices with Intel Modular interfaces Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -717,7 +697,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_intelmodular.8* %package ipdu -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM iPDU network power switches Requires: net-snmp-utils Requires: fence-agents-common = %{version}-%{release} @@ -730,7 +710,7 @@ via the SNMP protocol. %{_mandir}/man8/fence_ipdu.8* %package ipmilan -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agents for devices with IPMI interface Requires: /usr/bin/ipmitool Requires: fence-agents-common = %{version}-%{release} @@ -755,7 +735,7 @@ Fence agents for devices with IPMI interface. %ifarch x86_64 %package ironic -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for OpenStack's Ironic (Bare Metal as a service) Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -767,7 +747,7 @@ Fence agent for OpenStack's Ironic (Bare Metal as a service) service. %endif %package kdump -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for use with kdump crash recovery service Requires: fence-agents-common = %{version}-%{release} # this cannot be noarch since it's compiled @@ -780,7 +760,7 @@ Fence agent for use with kdump crash recovery service. %{_mandir}/man8/fence_kdump_send.8* %package ldom -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Sun LDom virtual machines Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -792,7 +772,7 @@ Fence agent for APC devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_ldom.8* %package lpar -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM LPAR Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -804,7 +784,7 @@ Fence agent for IBM LPAR devices that are accessed via telnet or SSH. %{_mandir}/man8/fence_lpar.8* %package mpath -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for reservations over Device Mapper Multipath Requires: device-mapper-multipath Requires: fence-agents-common = %{version}-%{release} @@ -818,7 +798,7 @@ Device Mapper Multipath. %{_mandir}/man8/fence_mpath.8* %package netio -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Koukaam NETIO devices Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -830,8 +810,22 @@ via telnet or SSH. %{_sbindir}/fence_netio %{_mandir}/man8/fence_netio.8* +%ifarch x86_64 +%package openstack +License: GPL-2.0-or-later and LGPL-2.0-or-later +Summary: Fence agent for OpenStack's Nova service +Requires: python3-requests +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description openstack +Fence agent for OpenStack's Nova service. +%files openstack +%{_sbindir}/fence_openstack +%{_mandir}/man8/fence_openstack.8* +%endif + %package ovh -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for OVH provider Requires: python3-suds2 Requires: fence-agents-common = %{version}-%{release} @@ -842,9 +836,21 @@ Fence agent for OVH hosting provider. %{_sbindir}/fence_ovh %{_mandir}/man8/fence_ovh.8* +%package ovm +License: GPL-2.0-or-later and LGPL-2.0-or-later +Summary: Fence agent for Oracle VM provider +Requires: python3-requests +Requires: fence-agents-common = %{version}-%{release} +BuildArch: noarch +%description ovm +Fence agent for Oracle VM provider. +%files ovm +%{_sbindir}/fence_ovm +%{_mandir}/man8/fence_ovm.8* + # skipped from allfenceagents %package pve -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for PVE Requires: python3-pycurl Requires: fence-agents-common = %{version}-%{release} @@ -857,7 +863,7 @@ Fence agent for PVE. # skipped from allfenceagents %package raritan -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Raritan Dominion PX Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -869,7 +875,7 @@ Fence agent for Raritan Dominion PX. # skipped from allfenceagents %package rcd-serial -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for RCD serial Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -880,7 +886,7 @@ Fence agent for RCD serial. %{_mandir}/man8/fence_rcd_serial.8* %package redfish -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Group: System Environment/Base Summary: Fence agent for Redfish Requires: fence-agents-common >= %{version}-%{release} @@ -894,7 +900,7 @@ The fence-agents-redfish package contains a fence agent for Redfish %{_mandir}/man8/fence_redfish.8* %package rhevm -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for RHEV-M Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -905,7 +911,7 @@ Fence agent for RHEV-M via REST API. %{_mandir}/man8/fence_rhevm.8* %package rsa -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM RSA II Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -918,7 +924,7 @@ via telnet or SSH. %{_mandir}/man8/fence_rsa.8* %package rsb -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Fujitsu RSB Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -931,7 +937,7 @@ via telnet or SSH. %{_mandir}/man8/fence_rsb.8* %package sanbox2 -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for QLogic SANBox2 FC switches Requires: telnet Requires: fence-agents-common = %{version}-%{release} @@ -943,7 +949,7 @@ Fence agent for QLogic SANBox2 switches that are accessed via telnet. %{_mandir}/man8/fence_sanbox2.8* %package sbd -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for SBD (storage-based death) Requires: sbd Requires: fence-agents-common = %{version}-%{release} @@ -955,7 +961,7 @@ Fence agent for SBD (storage-based death). %{_mandir}/man8/fence_sbd.8* %package scsi -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for SCSI persistent reservations Requires: sg3_utils Requires: fence-agents-common = %{version}-%{release} @@ -969,7 +975,7 @@ Fence agent for SCSI persistent reservations. %{_mandir}/man8/fence_scsi.8* %package vbox -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for VirtualBox Requires: openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -982,7 +988,7 @@ Fence agent for VirtualBox dom0 accessed via SSH. # skipped from allfenceagents %package virsh -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for virtual machines based on libvirt Requires: openssh-clients /usr/bin/virsh Requires: fence-agents-common = %{version}-%{release} @@ -994,7 +1000,7 @@ Fence agent for virtual machines that are accessed via SSH. %{_mandir}/man8/fence_virsh.8* %package vmware -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for VMWare with VI Perl Toolkit or vmrun Requires: python3-pexpect Requires: fence-agents-common = %{version}-%{release} @@ -1006,7 +1012,7 @@ Fence agent for VMWare accessed with VI Perl Toolkit or vmrun. %{_mandir}/man8/fence_vmware.8* %package vmware-rest -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for VMWare with REST API Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -1018,7 +1024,7 @@ Fence agent for VMWare with REST API. %{_mandir}/man8/fence_vmware_rest.8* %package vmware-soap -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for VMWare with SOAP API v4.1+ Requires: python3-suds2 Requires: fence-agents-common = %{version}-%{release} @@ -1030,7 +1036,7 @@ Fence agent for VMWare with SOAP API v4.1+. %{_mandir}/man8/fence_vmware_soap.8* %package vmware-vcloud -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for VMWare vCloud Director Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -1042,7 +1048,7 @@ Fence agent for VMWare vCloud Director. %{_mandir}/man8/fence_vmware_vcloud.8* %package wti -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for WTI Network power switches Requires: telnet openssh-clients Requires: fence-agents-common = %{version}-%{release} @@ -1055,7 +1061,7 @@ via telnet or SSH. %{_mandir}/man8/fence_wti.8* %package xenapi -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for Citrix XenServer over XenAPI Requires: python3-pexpect Requires: fence-agents-common = %{version}-%{release} @@ -1069,7 +1075,7 @@ Fence agent for Citrix XenServer accessed over XenAPI. %{_mandir}/man8/fence_xenapi.8* %package zvm -License: GPL-2.0-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later and LGPL-2.0-or-later Summary: Fence agent for IBM z/VM over IP Requires: fence-agents-common = %{version}-%{release} BuildArch: noarch @@ -1160,6 +1166,10 @@ are located on corosync cluster nodes. %{_libdir}/fence-virt/cpg.so %changelog +* Tue Aug 06 2024 zouzhimin - 4.15.0-1 +- update to 4.15.0 +- fence_sbd: --sbd-path defaults to /usr/sbin/sbd + * Fri Jun 28 2024 liupei - 4.12.1-15 - modify dev guide diff --git a/fence_ipmilan-fix-typo-in-description.patch b/fence_ipmilan-fix-typo-in-description.patch deleted file mode 100644 index 4afcf410d3b9ef30d2e7c49e4064869003523f17..0000000000000000000000000000000000000000 --- a/fence_ipmilan-fix-typo-in-description.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d989961f691c8e84b8a94f1b68ac88296753072d Mon Sep 17 00:00:00 2001 -From: Or Raz -Date: Thu, 20 Jul 2023 13:22:58 +0300 -Subject: [PATCH] fence_ipmilan: fix typo in description (#553) - ---- - agents/ipmilan/fence_ipmilan.py | 4 ++-- - tests/data/metadata/fence_idrac.xml | 2 +- - tests/data/metadata/fence_ilo3.xml | 2 +- - tests/data/metadata/fence_ilo4.xml | 2 +- - tests/data/metadata/fence_ilo5.xml | 2 +- - tests/data/metadata/fence_imm.xml | 2 +- - tests/data/metadata/fence_ipmilan.xml | 2 +- - tests/data/metadata/fence_ipmilanplus.xml | 2 +- - 8 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/agents/ipmilan/fence_ipmilan.py b/agents/ipmilan/fence_ipmilan.py -index 0acf977d..91e09ac7 100644 ---- a/agents/ipmilan/fence_ipmilan.py -+++ b/agents/ipmilan/fence_ipmilan.py -@@ -203,8 +203,8 @@ def main(): - - docs = {} - docs["shortdesc"] = "Fence agent for IPMI" -- docs["longdesc"] = "fence_ipmilan is an I/O Fencing agent\ --which can be used with machines controlled by IPMI.\ -+ docs["longdesc"] = "fence_ipmilan is an I/O Fencing agent \ -+which can be used with machines controlled by IPMI. \ - This agent calls support software ipmitool (http://ipmitool.sf.net/). \ - WARNING! This fence agent might report success before the node is powered off. \ - You should use -m/method onoff if your fence device works correctly with that option." -diff --git a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml -index 2d487649..d1f283e4 100644 ---- a/tests/data/metadata/fence_idrac.xml -+++ b/tests/data/metadata/fence_idrac.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml -index 0567b539..5aca0211 100644 ---- a/tests/data/metadata/fence_ilo3.xml -+++ b/tests/data/metadata/fence_ilo3.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml -index 647bb102..3aa001ad 100644 ---- a/tests/data/metadata/fence_ilo4.xml -+++ b/tests/data/metadata/fence_ilo4.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ilo5.xml b/tests/data/metadata/fence_ilo5.xml -index 6c99db22..26278790 100644 ---- a/tests/data/metadata/fence_ilo5.xml -+++ b/tests/data/metadata/fence_ilo5.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml -index 5c5bf910..26f9a76d 100644 ---- a/tests/data/metadata/fence_imm.xml -+++ b/tests/data/metadata/fence_imm.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml -index a31afcfd..daad65a7 100644 ---- a/tests/data/metadata/fence_ipmilan.xml -+++ b/tests/data/metadata/fence_ipmilan.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - -diff --git a/tests/data/metadata/fence_ipmilanplus.xml b/tests/data/metadata/fence_ipmilanplus.xml -index 19c25293..7b678b24 100644 ---- a/tests/data/metadata/fence_ipmilanplus.xml -+++ b/tests/data/metadata/fence_ipmilanplus.xml -@@ -6,7 +6,7 @@ - - - --fence_ipmilan is an I/O Fencing agentwhich can be used with machines controlled by IPMI.This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. -+fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software ipmitool (http://ipmitool.sf.net/). WARNING! This fence agent might report success before the node is powered off. You should use -m/method onoff if your fence device works correctly with that option. - - - --- -2.25.1 - diff --git a/fence_scsi-fix-registration-handling-if-ISID-conflic.patch b/fence_scsi-fix-registration-handling-if-ISID-conflic.patch deleted file mode 100644 index ce366a0a7046258436039f662230739455023075..0000000000000000000000000000000000000000 --- a/fence_scsi-fix-registration-handling-if-ISID-conflic.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 9d0d0d013c7edae43a4ebc5f46bf2e7a4f127654 Mon Sep 17 00:00:00 2001 -From: "sreejit.mohanan" -Date: Fri, 17 Feb 2023 18:04:03 -0800 -Subject: [PATCH] fence_scsi: fix registration handling if ISID conflicts ISID - (Initiator Session ID) belonging to I_T Nexus changes for RHEL based on the - session ID. This means that the connection to the device can be set up with - different ISID on reconnects. - -fence_scsi treats same key as a tip to ignore issuing registration -to the device but if the device was registered using a different -ISID, the key would be the same but the I_T Nexus (new ISID) would -not have access to the device. - -Fixing this by preempting the old key and replacing with the current -one. ---- - agents/scsi/fence_scsi.py | 35 ++++++++++++++++++++++++++++++++--- - 1 file changed, 32 insertions(+), 3 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index f9e6823b..85e4f29e 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -137,12 +137,41 @@ def register_dev(options, dev): - for slave in get_mpath_slaves(dev): - register_dev(options, slave) - return True -- if get_reservation_key(options, dev, False) == options["--key"]: -- return True -+ -+ # Check if any registration exists for the key already. We track this in -+ # order to decide whether the existing registration needs to be cleared. -+ # This is needed since the previous registration could be for a -+ # different I_T nexus (different ISID). -+ registration_key_exists = False -+ if options["--key"] in get_registration_keys(options, dev): -+ registration_key_exists = True -+ if not register_helper(options, options["--key"], dev): -+ return False -+ -+ if registration_key_exists: -+ # If key matches, make sure it matches with the connection that -+ # exists right now. To do this, we can issue a preempt with same key -+ # which should replace the old invalid entries from the target. -+ if not preempt(options, options["--key"], dev): -+ return False -+ -+ # If there was no reservation, we need to issue another registration -+ # since the previous preempt would clear registration made above. -+ if get_reservation_key(options, dev, False) != options["--key"]: -+ return register_helper(options, options["--key"], dev) -+ return True -+ -+# cancel registration without aborting tasks -+def preempt(options, host, dev): -+ reset_dev(options,dev) -+ cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host + " -S " + options["--key"] + " -d " + dev -+ return not bool(run_cmd(options, cmd)["rc"]) -+ -+# helper function to send the register command -+def register_helper(options, host, dev): - reset_dev(options, dev) - cmd = options["--sg_persist-path"] + " -n -o -I -S " + options["--key"] + " -d " + dev - cmd += " -Z" if "--aptpl" in options else "" -- #cmd return code != 0 but registration can be successful - return not bool(run_cmd(options, cmd)["rc"]) - - --- -2.25.1 - diff --git a/fence_scsi-fix-registration-handling-in-device-off-workflows.patch b/fence_scsi-fix-registration-handling-in-device-off-workflows.patch deleted file mode 100644 index ee77c22420dad7af21f3ade4618d98a96cf253f2..0000000000000000000000000000000000000000 --- a/fence_scsi-fix-registration-handling-in-device-off-workflows.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 34baef58db442148b8e067509d2cdd37b7a91ef4 Mon Sep 17 00:00:00 2001 -From: "sreejit.mohanan" -Date: Thu, 7 Sep 2023 15:57:51 -0700 -Subject: [PATCH] fence_scsi: fix registration handling in device 'off' - workflows - -ISID (Initiator Session ID) belonging to I_T Nexus changes for -RHEL based on the session ID. This means that the connection to -the device can be set up with different ISID on reconnects. - -When a device is powered off, fence_scsi assumes that the client -has a registration to the device and sends a preempt-and-abort -request which ends up failing due to reservation conflict. - -Fixing this by registering the host key with the device and preempting -the old registration (if it exists). This should make sure that the -host is able to preempt the other key successfully. ---- - agents/scsi/fence_scsi.py | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 42530ceb..519319bf 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -41,7 +41,7 @@ def set_status(conn, options): - for dev in options["devices"]: - is_block_device(dev) - -- register_dev(options, dev) -+ register_dev(options, dev, options["--key"]) - if options["--key"] not in get_registration_keys(options, dev): - count += 1 - logging.debug("Failed to register key "\ -@@ -62,7 +62,7 @@ def set_status(conn, options): - fail_usage("Failed: keys cannot be same. You can not fence yourself.") - for dev in options["devices"]: - is_block_device(dev) -- -+ register_dev(options, dev, host_key) - if options["--key"] in get_registration_keys(options, dev): - preempt_abort(options, host_key, dev) - -@@ -131,11 +131,11 @@ def reset_dev(options, dev): - return run_cmd(options, options["--sg_turs-path"] + " " + dev)["rc"] - - --def register_dev(options, dev): -+def register_dev(options, dev, key): - dev = os.path.realpath(dev) - if re.search(r"^dm", dev[5:]): - for slave in get_mpath_slaves(dev): -- register_dev(options, slave) -+ register_dev(options, slave, key) - return True - - # Check if any registration exists for the key already. We track this in -@@ -143,34 +143,35 @@ def register_dev(options, dev): - # This is needed since the previous registration could be for a - # different I_T nexus (different ISID). - registration_key_exists = False -- if options["--key"] in get_registration_keys(options, dev): -+ if key in get_registration_keys(options, dev): -+ logging.debug("Registration key exists for device " + dev) - registration_key_exists = True -- if not register_helper(options, options["--key"], dev): -+ if not register_helper(options, dev, key): - return False - - if registration_key_exists: - # If key matches, make sure it matches with the connection that - # exists right now. To do this, we can issue a preempt with same key - # which should replace the old invalid entries from the target. -- if not preempt(options, options["--key"], dev): -+ if not preempt(options, key, dev, key): - return False - - # If there was no reservation, we need to issue another registration - # since the previous preempt would clear registration made above. -- if get_reservation_key(options, dev, False) != options["--key"]: -- return register_helper(options, options["--key"], dev) -+ if get_reservation_key(options, dev, False) != key: -+ return register_helper(options, dev, key) - return True - --# cancel registration without aborting tasks --def preempt(options, host, dev): -+# helper function to preempt host with 'key' using 'host_key' without aborting tasks -+def preempt(options, host_key, dev, key): - reset_dev(options,dev) -- cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host + " -S " + options["--key"] + " -d " + dev -+ cmd = options["--sg_persist-path"] + " -n -o -P -T 5 -K " + host_key + " -S " + key + " -d " + dev - return not bool(run_cmd(options, cmd)["rc"]) - - # helper function to send the register command --def register_helper(options, host, dev): -+def register_helper(options, dev, key): - reset_dev(options, dev) -- cmd = options["--sg_persist-path"] + " -n -o -I -S " + options["--key"] + " -d " + dev -+ cmd = options["--sg_persist-path"] + " -n -o -I -S " + key + " -d " + dev - cmd += " -Z" if "--aptpl" in options else "" - return not bool(run_cmd(options, cmd)["rc"]) - --- -2.25.1 -