86a3dd56d6
- fence_brocade: Add support for 'list' action - fencing: Monitor is not working correctly without 'list' or 'status' - fence_apc_snmp: Add support for firmware 6.x - fence_zvm: Add support for "on" and "status" - fence_zvm: Add current XML metadata to test suite - [build] Fix automake files, so 'make distcheck' works - fencing: Add new options --ssl-secure and --ssl-insecure - [tests] Update XML metadata of fence agents - fence_cisco_ucs & fence_vmware_soap: Logout has to be performed even when fencing fails - fence_zvm: Fixes for better upstream inclusion - fence_zvm: Add support for 'on', improve documentation - Added patches: - 0001-fence_brocade-Add-support-for-list-action.patch - 0002-fencing-Monitor-is-not-working-correctly-without-lis.patch - 0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch - 0004-fence_zvm-Add-support-for-on-and-status.patch - 0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch - 0006-build-Fix-automake-files-so-make-distcheck-works.patch - 0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch - 0008-tests-Update-XML-metadata-of-fence-agents.patch - 0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch - 0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch - 0011-fence_zvm-Add-support-for-on-improve-documentation.patch - Add dependency on python-requests OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=16
66 lines
2.3 KiB
Diff
66 lines
2.3 KiB
Diff
From 5a1fd08c7cf4a4c7d41db3db0a83eed226804b40 Mon Sep 17 00:00:00 2001
|
|
From: Marek 'marx' Grac <mgrac@redhat.com>
|
|
Date: Tue, 1 Jul 2014 15:27:27 +0200
|
|
Subject: [PATCH 02/11] fencing: Monitor is not working correctly without
|
|
'list' or 'status'
|
|
|
|
Action monitor either executes 'status' (without --plug) or 'list' (with --plug). But
|
|
it is not required to have 'list' action. If they do not then 'monitor' has to be done
|
|
in different way, e.g. login/logout.
|
|
---
|
|
fence/agents/ovh/fence_ovh.py | 13 ++++++++++---
|
|
fence/agents/raritan/fence_raritan.py | 5 ++++-
|
|
2 files changed, 14 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py
|
|
index f9a1c39..14a0706 100644
|
|
--- a/fence/agents/ovh/fence_ovh.py
|
|
+++ b/fence/agents/ovh/fence_ovh.py
|
|
@@ -94,10 +94,10 @@ Poweroff is simulated with a reboot into rescue-pro mode."
|
|
docs["vendorurl"] = "http://www.ovh.net"
|
|
show_docs(options, docs)
|
|
|
|
- if options["--action"] in ["list", "status"]:
|
|
- fail_usage("Action '" + options["--action"] + "' is not supported in this fence agent")
|
|
+ if options["--action"] == "list":
|
|
+ fail_usage("Action 'list' is not supported in this fence agent")
|
|
|
|
- if not options["--plug"].endswith(".ovh.net"):
|
|
+ if options["--action"] != "monitor" and not options["--plug"].endswith(".ovh.net"):
|
|
options["--plug"] += ".ovh.net"
|
|
|
|
if not options.has_key("--email"):
|
|
@@ -107,6 +107,13 @@ Poweroff is simulated with a reboot into rescue-pro mode."
|
|
|
|
conn = soap_login(options)
|
|
|
|
+ if options["--action"] == 'monitor':
|
|
+ try:
|
|
+ conn.service.logout(options["session"])
|
|
+ except Exception:
|
|
+ pass
|
|
+ sys.exit(0)
|
|
+
|
|
# Save datetime just before changing netboot
|
|
before_netboot_reboot = datetime.now()
|
|
|
|
diff --git a/fence/agents/raritan/fence_raritan.py b/fence/agents/raritan/fence_raritan.py
|
|
index 3506e25..bb6ad52 100644
|
|
--- a/fence/agents/raritan/fence_raritan.py
|
|
+++ b/fence/agents/raritan/fence_raritan.py
|
|
@@ -79,7 +79,10 @@ block any necessary fencing actions."
|
|
except pexpect.TIMEOUT:
|
|
fail(EC_LOGIN_DENIED)
|
|
|
|
- result = fence_action(conn, options, set_power_status, get_power_status)
|
|
+ result = 0
|
|
+ if options["--action"] != "monitor":
|
|
+ result = fence_action(conn, options, set_power_status, get_power_status)
|
|
+
|
|
fence_logout(conn, "exit\n")
|
|
sys.exit(result)
|
|
|
|
--
|
|
1.8.4.5
|
|
|