fence-agents/0009-fence_compute-Fix-disabling-force_down-on-node-when-.patch

63 lines
2.5 KiB
Diff
Raw Normal View History

- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
From 6d2776559a5bb11b83e9703bed2aeec681207b78 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@suse.com>
Date: Wed, 3 Feb 2016 13:45:52 +0100
- Update to version 4.0.23: * A lot of changes in fence_compute (OpenStack compute instance) * Obtain status of nodes from Cisco UCS correctly * New fence agent for AMT using openwsman * Python3 support * Fence agent for PVE can be used by non-root users * Parallel building and testing of fence agents * Fix occasional failures of APC fence agent - Updated fence_compute patch set: - Add 0001-fence_compute-Create-nova-client-with-API-2.11.patch - Add 0002-fence_compute-Keep-compatibility-with-python-novacli.patch - Add 0003-fence_compute-Only-list-nova-compute-services-when-g.patch - Add 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch - Add 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch - Add 0006-fence_compute-Fix-use-of-undefined-variable.patch - Add 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch - Add 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch - Add 0009-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0001-fence_compute-Add-insecure-command-line-argument.patch - Remove 0002-fence_compute-Add-region-name-command-line-argument.patch - Remove 0003-fence_compute-Create-nova-client-with-API-2.11.patch - Remove 0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0005-fence_compute-Evacuate-instances-on-all-tenants.patch - Remove 0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch - Remove 0007-fence_compute-Only-list-nova-compute-services-when-g.patch - Remove 0008-fence_compute-Deprecate-the-domain-option.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=52
2016-06-30 12:01:27 +02:00
Subject: [PATCH 9/9] fence_compute: Fix disabling force_down on node when
action is on
When the action is on, the goal is to disable force_down for the
nova-compute service on the node.
However, we were only doing that if the nova-compute service was up;
which is impossible if it's forced to be down... So just always disable
force_down, and then, if it's up, do more things.
---
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
fence/agents/compute/fence_compute.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
index cb7dfe3..00a49cb 100644
--- a/fence/agents/compute/fence_compute.py
+++ b/fence/agents/compute/fence_compute.py
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
@@ -159,23 +159,23 @@ def set_power_status(_, options):
return
if options["--action"] == "on":
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
- if get_power_status(_, options) != "on":
+ try:
+ # Forcing the host back up
+ nova.services.force_down(
+ options["--plug"], "nova-compute", force_down=False)
+ except Exception as e:
- Update to version 4.0.23: * A lot of changes in fence_compute (OpenStack compute instance) * Obtain status of nodes from Cisco UCS correctly * New fence agent for AMT using openwsman * Python3 support * Fence agent for PVE can be used by non-root users * Parallel building and testing of fence agents * Fix occasional failures of APC fence agent - Updated fence_compute patch set: - Add 0001-fence_compute-Create-nova-client-with-API-2.11.patch - Add 0002-fence_compute-Keep-compatibility-with-python-novacli.patch - Add 0003-fence_compute-Only-list-nova-compute-services-when-g.patch - Add 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch - Add 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch - Add 0006-fence_compute-Fix-use-of-undefined-variable.patch - Add 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch - Add 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch - Add 0009-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0001-fence_compute-Add-insecure-command-line-argument.patch - Remove 0002-fence_compute-Add-region-name-command-line-argument.patch - Remove 0003-fence_compute-Create-nova-client-with-API-2.11.patch - Remove 0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0005-fence_compute-Evacuate-instances-on-all-tenants.patch - Remove 0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch - Remove 0007-fence_compute-Only-list-nova-compute-services-when-g.patch - Remove 0008-fence_compute-Deprecate-the-domain-option.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=52
2016-06-30 12:01:27 +02:00
+ # In theory, if force_down=False fails, that's for the exact
+ # same possible reasons that below with force_down=True
+ # eg. either an incompatible version or an old client.
+ # Since it's about forcing back to a default value, there is
+ # no real worries to just consider it's still okay even if the
+ # command failed
+ logging.info("Exception from attempt to force "
+ "host back up via nova API: "
+ "%s: %s" % (e.__class__.__name__, e))
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
+ if get_power_status(_, options) == "on":
# Forcing the service back up in case it was disabled
nova.services.enable(options["--plug"], 'nova-compute')
- try:
- # Forcing the host back up
- nova.services.force_down(
- options["--plug"], "nova-compute", force_down=False)
- except Exception as e:
- Update to version 4.0.23: * A lot of changes in fence_compute (OpenStack compute instance) * Obtain status of nodes from Cisco UCS correctly * New fence agent for AMT using openwsman * Python3 support * Fence agent for PVE can be used by non-root users * Parallel building and testing of fence agents * Fix occasional failures of APC fence agent - Updated fence_compute patch set: - Add 0001-fence_compute-Create-nova-client-with-API-2.11.patch - Add 0002-fence_compute-Keep-compatibility-with-python-novacli.patch - Add 0003-fence_compute-Only-list-nova-compute-services-when-g.patch - Add 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch - Add 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch - Add 0006-fence_compute-Fix-use-of-undefined-variable.patch - Add 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch - Add 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch - Add 0009-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0001-fence_compute-Add-insecure-command-line-argument.patch - Remove 0002-fence_compute-Add-region-name-command-line-argument.patch - Remove 0003-fence_compute-Create-nova-client-with-API-2.11.patch - Remove 0004-fence_compute-Fix-disabling-force_down-on-node-when-.patch - Remove 0005-fence_compute-Evacuate-instances-on-all-tenants.patch - Remove 0006-fence_compute-On-list-don-t-list-hypervisors-but-nov.patch - Remove 0007-fence_compute-Only-list-nova-compute-services-when-g.patch - Remove 0008-fence_compute-Deprecate-the-domain-option.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=52
2016-06-30 12:01:27 +02:00
- # In theory, if force_down=False fails, that's for the exact
- # same possible reasons that below with force_down=True
- # eg. either an incompatible version or an old client.
- # Since it's about forcing back to a default value, there is
- # no real worries to just consider it's still okay even if the
- # command failed
- logging.info("Exception from attempt to force "
- "host back up via nova API: "
- "%s: %s" % (e.__class__.__name__, e))
else:
# Pretend we're 'on' so that the fencing library doesn't loop forever waiting for the node to boot
override_status = "on"
--
- Update to version 4.0.24+git.1480563949.e67fcd4: * fence_azure_arm: add fencing agent for Azure Resource Manager * fence_lpar: Add support for IVM * fence_lpar: Handle exceptions when invalid output is read * fence_zvmip: Update XML metadata * fence_compute: fix ConnectionError by using full module name * fence_powerman: add fence agent for powerman * Suppress InsecureRequestWarning when ssl_insecure is given * compute: Correctly handle installations without tagged flavours * compute: Use the best available nova API version * compute: correctly implement 'on' when the force-down API call is available * compute: Correctly identify when the nodename already includes the supplied domain * compute: Ensure we can connect to nova when fixing the plug name * compute: Simpler check for nova force down compatibility - Rebase and remove merged patches: * Remove 0001-fence_compute-Create-nova-client-with-API-2.11.patch * Remove 0002-fence_compute-Keep-compatibility-with-python-novacli.patch * Remove 0003-fence_compute-Only-list-nova-compute-services-when-g.patch * Remove 0004-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Remove 0005-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Remove 0006-fence_compute-Fix-use-of-undefined-variable.patch * Remove 0007-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Remove 0008-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0001-fence_compute-Only-list-nova-compute-services-when-g.patch * Add 0002-fence_compute-Don-t-list-hypervisors-but-nova-comput.patch * Add 0003-fence_compute-Do-not-override-domain-if-it-is-alread.patch * Add 0004-fence_compute-Fix-handling-of-domain-None.patch * Add 0005-fence_compute-Fix-fix_domain-to-not-return-too-early.patch * Add 0006-fence_compute-Fix-fix_plug_name-when-looking-if-plug.patch * Add 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=56
2016-12-01 14:22:57 +01:00
2.10.1