Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=02bdd80e…
Commit: 02bdd80e1077441aa2d50ef823068120a0a92725
Parent: c2f2ecdab12da4582509b00b18972b3da7a5cee4
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 15:27:27 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 15:27:27 2014 +0200
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)
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=03e982d2…
Commit: 03e982d2fdb82376ecd8c497f6c346bc5d8c6436
Parent: 0000000000000000000000000000000000000000
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: 2014-07-01 11:29 +0000
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: 2014-07-01 11:29 +0000
annotated tag: v4.0.10 has been created
at 03e982d2fdb82376ecd8c497f6c346bc5d8c6436 (tag)
tagging f0bb209a3a35c46cdb3cc2cbb2bdbdf4051407dc (commit)
replaces v4.0.9
v4.0.10 release
Marek 'marx' Grac (15):
fence_scsi: Do not use SYMTARGET for fence_scsi_check
fence_scsi: --delay should be applied before attempt to test available devices
fence_zvm: Add a zvmsys option to fence_zvm to support distributed z/VM systems
fence_zvm: Add support for --delay in fence_zvm
testing: fence_zvm agent is tested for working delay function
testing: Update XML metadata for fence_zvmip
[clean] set_multi_power_fn now also includes support for --retry-on
fencing: Fix problems when fence agent do not have --plug / -n
[testing] Add XML metadata for fence_scsi
fencing: Remove unmaintained fence agents
fence_rsb: Accept new prompt in parsing
fencing: Checking status of several slots was done incorectly
[build] Ensure that we are building in correct directory
fencing: Fix problems with options without short getopt
[build] Fix build system to cover tests properly
Ondrej Mular (2):
fence_scsi: port to fencing library
fence_docker: new fence agent for Docker containers