fence-agents: RHEL6 - fence_brocade: update backported patch for older library
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=10e1a2...
Commit: 10e1a224de1cf3af9d1a870faf3aa8a2533f86ca
Parent: fbbfd49ca088afe1e48127ae134b8671659fee15
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jul 2 11:06:37 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jul 2 11:06:37 2014 +0200
fence_brocade: update backported patch for older library
---
fence/agents/brocade/fence_brocade.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index 4bd28b6..be19f6b 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -36,7 +36,7 @@ def get_power_status(conn, options):
status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
outlets[tokens[0]] = ("", status)
- if options["-o"] == "status":
+ if options["-o"] != "monitor":
(_, status) = outlets[options["-n"]]
return status
else:
9 years, 10 months
fence-agents: RHEL6 - fence_brocade: update backported patch for older library
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=fbbfd4...
Commit: fbbfd49ca088afe1e48127ae134b8671659fee15
Parent: d2e3a5e8077bacf70a97a06e9ddd80bfcd8f482d
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jul 2 10:47:22 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jul 2 10:47:22 2014 +0200
fence_brocade: update backported patch for older library
---
fence/agents/brocade/fence_brocade.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index 0ab669a..4bd28b6 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -27,7 +27,7 @@ def get_power_status(conn, options):
in_index = False
conn.send_eol("switchshow")
- conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+ conn.log_expect(options, options["-c"], int(options["-g"]))
for line in str(conn.before).split("\n"):
if line_re.search(line):
in_index = True
@@ -36,8 +36,8 @@ def get_power_status(conn, options):
status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
outlets[tokens[0]] = ("", status)
- if options["--action"] == "status":
- (_, status) = outlets[options["--plug"]]
+ if options["-o"] == "status":
+ (_, status) = outlets[options["-n"]]
return status
else:
return outlets
9 years, 10 months
fence-agents: master - fencing: Monitor is not working correctly without 'list' or 'status'
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=02bdd8...
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)
9 years, 10 months
fence-agents: master - fence_brocade: Add support for 'list' action
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=c2f2ec...
Commit: c2f2ecdab12da4582509b00b18972b3da7a5cee4
Parent: f823459eee42c8858b8eca65f26d0e313db0e1d2
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 15:25:45 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 15:25:45 2014 +0200
fence_brocade: Add support for 'list' action
---
fence/agents/brocade/fence_brocade.py | 41 +++++++++++++++++---------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index f935280..3e5dd93 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -12,24 +12,6 @@ REDHAT_COPYRIGHT=""
BUILD_DATE="March, 20013"
#END_VERSION_GENERATION
-def get_power_status(conn, options):
- conn.send_eol("portCfgShow " + options["--plug"])
-
- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
-
- show_re = re.compile(r'^\s*Persistent Disable\s*(ON|OFF)\s*$', re.IGNORECASE)
- lines = conn.before.split("\n")
-
- for line in lines:
- res = show_re.search(line)
- if res != None:
- # We queried if it is disabled, so we have to negate answer
- if res.group(1) == "ON":
- return "off"
- else:
- return "on"
-
- fail(EC_STATUS)
def set_power_status(conn, options):
action = {
'on' : "portCfgPersistentEnable",
@@ -39,6 +21,27 @@ def set_power_status(conn, options):
conn.send_eol(action + " " + options["--plug"])
conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+def get_power_status(conn, options):
+ line_re = re.compile(r'=========', re.IGNORECASE)
+ outlets = {}
+ in_index = False
+
+ conn.send_eol("switchshow")
+ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+ for line in str(conn.before).split("\n"):
+ if line_re.search(line):
+ in_index = True
+ elif in_index and line.lstrip()[0].isdigit():
+ tokens = line.lstrip().split()
+ status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
+ outlets[tokens[0]] = ("", status)
+
+ if options["--action"] == "status":
+ (_, status) = outlets[options["--plug"]]
+ return status
+ else:
+ return outlets
+
def main():
device_opt = ["ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "fabric_fencing"]
@@ -66,7 +69,7 @@ FC switch needs to be enabled. This can be done by running fence_brocade and spe
## Operate the fencing device
####
conn = fence_login(options)
- result = fence_action(conn, options, set_power_status, get_power_status, None)
+ result = fence_action(conn, options, set_power_status, get_power_status, get_power_status)
fence_logout(conn, "exit")
sys.exit(result)
9 years, 10 months
fence-agents: master - [build] Fix building of fence_scsi_check
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=f82345...
Commit: f823459eee42c8858b8eca65f26d0e313db0e1d2
Parent: f0bb209a3a35c46cdb3cc2cbb2bdbdf4051407dc
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 14:55:08 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 14:55:08 2014 +0200
[build] Fix building of fence_scsi_check
---
fence/agents/scsi/Makefile.am | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fence/agents/scsi/Makefile.am b/fence/agents/scsi/Makefile.am
index 5722e18..c82e043 100644
--- a/fence/agents/scsi/Makefile.am
+++ b/fence/agents/scsi/Makefile.am
@@ -4,16 +4,20 @@ TARGET = fence_scsi
SRC = $(TARGET).py
-EXTRA_DIST = $(SRC)
+EXTRA_DIST = $(SRC) \
+ fence_scsi_check
-sbin_SCRIPTS = $(TARGET) fence_scsi_check
+scsidatadir = $(CLUSTERDATA)
+scsidata_SCRIPTS = fence_scsi_check
+
+sbin_SCRIPTS = $(TARGET)
man_MANS = $(TARGET).8
FENCE_TEST_ARGS = -k 1
fence_scsi_check: $(TARGET)
- cp -s $^ $@
+ cp $^ $@
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
9 years, 10 months
fence-agents: v4.0.10 annotated tag has been created
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=03e982...
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
9 years, 10 months
fence-agents: master - [build] Fix build system to cover tests properly
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=f0bb20...
Commit: f0bb209a3a35c46cdb3cc2cbb2bdbdf4051407dc
Parent: bc817baa3d02c6c20eb558b30669ff059a283aa5
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 13:18:05 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 13:18:05 2014 +0200
[build] Fix build system to cover tests properly
---
Makefile.am | 2 +-
make/agentccheck.mk | 2 +-
make/agentpycheck.mk | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 1bd077a..e70dac5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
EXTRA_DIST = autogen.sh make/fencebuild.mk scripts/fenceparse \
.version make/release.mk \
- make/git-version-gen make/gitlog-to-changelog
+ make/git-version-gen make/gitlog-to-changelog tests
AUTOMAKE_OPTIONS = foreign
diff --git a/make/agentccheck.mk b/make/agentccheck.mk
index 32dc160..3ef97f9 100644
--- a/make/agentccheck.mk
+++ b/make/agentccheck.mk
@@ -1,5 +1,5 @@
TEMPFILE:=$(shell mktemp)
-DATADIR:=../../../tests/data/metadata
+DATADIR:=$(abs_top_builddir)/../tests/data/metadata
check: $(TARGET:%=xml-check.%) $(SYMTARGET:%=xml-check.%)
diff --git a/make/agentpycheck.mk b/make/agentpycheck.mk
index 271e0bf..ae4e477 100644
--- a/make/agentpycheck.mk
+++ b/make/agentpycheck.mk
@@ -1,5 +1,5 @@
TEMPFILE:=$(shell mktemp)
-DATADIR:=../../../tests/data/metadata
+DATADIR:=$(abs_top_builddir)/../tests/data/metadata
check: $(TARGET:%=xml-check.%) $(SYMTARGET:%=xml-check.%) $(TARGET:%=delay-check.%)
9 years, 10 months
fence-agents: RHEL6 - fence_brocade: Action 'monitor' is not working for fence agents without list
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=d2e3a5...
Commit: d2e3a5e8077bacf70a97a06e9ddd80bfcd8f482d
Parent: d7874ca8e16697b0607d01950d358761e6ae0748
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 10:23:26 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 10:23:26 2014 +0200
fence_brocade: Action 'monitor' is not working for fence agents without list
Resolves: rhbz#1114528
---
fence/agents/brocade/fence_brocade.py | 41 +++++++++++++++++---------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index db06e7c..0ab669a 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -12,24 +12,6 @@ REDHAT_COPYRIGHT=""
BUILD_DATE="March, 20013"
#END_VERSION_GENERATION
-def get_power_status(conn, options):
- conn.send_eol("portCfgShow " + options["-n"])
-
- conn.log_expect(options, options["-c"], int(options["-Y"]))
-
- show_re = re.compile(r'^\s*Persistent Disable\s*(ON|OFF)\s*$', re.IGNORECASE)
- lines = conn.before.split("\n")
-
- for line in lines:
- res = show_re.search(line)
- if res != None:
- # We queried if it is disabled, so we have to negate answer
- if res.group(1) == "ON":
- return "off"
- else:
- return "on"
-
- fail(EC_STATUS)
def set_power_status(conn, options):
action = {
'on' : "portCfgPersistentEnable",
@@ -39,6 +21,27 @@ def set_power_status(conn, options):
conn.send_eol(action + " " + options["-n"])
conn.log_expect(options, options["-c"], int(options["-Y"]))
+def get_power_status(conn, options):
+ line_re = re.compile(r'=========', re.IGNORECASE)
+ outlets = {}
+ in_index = False
+
+ conn.send_eol("switchshow")
+ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
+ for line in str(conn.before).split("\n"):
+ if line_re.search(line):
+ in_index = True
+ elif in_index and line.lstrip()[0].isdigit():
+ tokens = line.lstrip().split()
+ status = "off" if len(tokens) > 7 and tokens[7] == "Disabled" else "on"
+ outlets[tokens[0]] = ("", status)
+
+ if options["--action"] == "status":
+ (_, status) = outlets[options["--plug"]]
+ return status
+ else:
+ return outlets
+
def main():
device_opt = ["help", "version", "agent", "quiet", "verbose", "debug",
"ipaddr", "login", "passwd", "passwd_script",
@@ -70,7 +73,7 @@ FC switch needs to be enabled. This can be done by running fence_brocade and spe
## Operate the fencing device
####
conn = fence_login(options)
- result = fence_action(conn, options, set_power_status, get_power_status, None)
+ result = fence_action(conn, options, set_power_status, get_power_status, get_power_status)
try:
fence_logout(conn, "exit")
except:
9 years, 10 months
fence-agents: RHEL6 - fence_brocade: Fix default action
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=d7874c...
Commit: d7874ca8e16697b0607d01950d358761e6ae0748
Parent: a5ce29b7dd9b07f0e5038b197a8260a313b7cadd
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Jul 1 10:19:33 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Jul 1 10:22:59 2014 +0200
fence_brocade: Fix default action
Resolves: rhbz#1114559
---
fence/agents/brocade/fence_brocade.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index c3fde30..db06e7c 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -41,7 +41,7 @@ def set_power_status(conn, options):
def main():
device_opt = ["help", "version", "agent", "quiet", "verbose", "debug",
- "action", "ipaddr", "login", "passwd", "passwd_script",
+ "ipaddr", "login", "passwd", "passwd_script",
"secure", "identity_file", "separator", "cmd_prompt",
"inet4_only", "inet6_only", "ipport", "io_fencing", "port",
"power_timeout", "shell_timeout", "login_timeout", "power_wait"]
9 years, 10 months