cluster: RHEL6 - fenced: wait for ringid
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=e3f8a987f01...
Commit: e3f8a987f0108b0f5c1c76e8750c35f23fca2191
Parent: 88d1e87314a1088ea50b2c29c6b0205c9b34281c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Jul 9 13:35:36 2013 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Jan 9 16:57:46 2014 -0600
fenced: wait for ringid
Ensure we don't process a nodedown confchg before getting
the corresponding ringid cb.
This miscompare happens when the cpg confchg callback is
delivered before either the cluster change or cpg ringid
callback. (Usually the cluster change arrives first, so
this is not a common problem.)
Copied same fix from dlm.git commit 02850b6
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/fenced/cpg.c | 25 +++++++++++++++++++++++++
fence/fenced/fd.h | 1 +
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/fence/fenced/cpg.c b/fence/fenced/cpg.c
index a5a4208..0fde6a6 100644
--- a/fence/fenced/cpg.c
+++ b/fence/fenced/cpg.c
@@ -709,6 +709,27 @@ static int check_quorum_done(struct fd *fd)
static int check_ringid_done(struct fd *fd)
{
+ /* If we've received a confchg due to a nodedown, but not
+ the corresponding ringid callback, then we should wait
+ for the ringid callback. Once we have both conf and ring
+ callbacks, we can compare cpg/quorum ringids.
+
+ Otherwise, there's a possible problem if we receive a
+ confchg before both ringid callback and quorum callback.
+ Then we'd get through this function by comparing the old,
+ matching ringids.
+
+ (We seem to usually get the quorum callback before any cpg
+ callbacks, in which case we wouldn't need cpg_ringid_wait,
+ but that's probably not guaranteed.) */
+
+ if (fd->cpg_ringid_wait) {
+ log_debug("check_ringid wait cluster %u cpg %u:%llu",
+ cluster_ringid_seq, fd->cpg_ringid.nodeid,
+ (unsigned long long)fd->cpg_ringid.seq);
+ return 0;
+ }
+
if (cluster_ringid_seq != (uint32_t)fd->cpg_ringid.seq) {
log_debug("check_ringid cluster %u cpg %u:%llu",
cluster_ringid_seq, fd->cpg_ringid.nodeid,
@@ -1472,6 +1493,9 @@ static int add_change(struct fd *fd,
}
list_add_tail(&memb->list, &cg->removed);
+ if (left_list[i].reason == CPG_REASON_NODEDOWN)
+ fd->cpg_ringid_wait = 1;
+
if (memb->failed)
node_history_fail(fd, memb->nodeid, cg->seq);
else
@@ -1703,6 +1727,7 @@ static void totem_cb_domain(cpg_handle_t handle,
fd->cpg_ringid.nodeid = ring_id.nodeid;
fd->cpg_ringid.seq = ring_id.seq;
+ fd->cpg_ringid_wait = 0;
apply_changes(fd);
}
diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h
index 34a6c7f..d678bfa 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -182,6 +182,7 @@ struct fd {
int init_complete;
int local_init_complete;
struct cpg_ring_id cpg_ringid;
+ int cpg_ringid_wait;
/* general domain membership */
10 years, 5 months
fence-agents: master - fence_vmware_soap: --delay is not respected
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=530e97...
Commit: 530e97f05e43bdd5bef9d24c75d4cc3057a491e8
Parent: 626035de9ad2dab222f79814afa6a1820d252a8a
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Fri Jan 10 15:54:49 2014 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jan 10 15:54:49 2014 +0100
fence_vmware_soap: --delay is not respected
Because fence agent do not use standard login process, support for the --delay has to be added.
---
fence/agents/vmware_soap/fence_vmware_soap.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 98ac011..acfdcbb 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import sys, exceptions
+import sys, exceptions, time
import shutil, tempfile
sys.path.append("@FENCEAGENTSLIBDIR@")
@@ -15,6 +15,9 @@ BUILD_DATE="April, 2011"
#END_VERSION_GENERATION
def soap_login(options):
+ if options["-o"] in ["off", "reboot"]:
+ time.sleep(int(options["--delay"]))
+
if options.has_key("--ssl"):
url = "https://"
else:
10 years, 5 months
fence-agents: v4.0.6 annotated tag has been created
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=1c5d37...
Commit: 1c5d378fa62505b9d01a7967bcac54142941b9c5
Parent: 0000000000000000000000000000000000000000
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: 2014-01-10 13:05 +0000
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: 2014-01-10 13:05 +0000
annotated tag: v4.0.6 has been created
at 1c5d378fa62505b9d01a7967bcac54142941b9c5 (tag)
tagging 626035de9ad2dab222f79814afa6a1820d252a8a (commit)
replaces v4.0.5
v4.0.6 release
Bogdan Dobrelya (1):
fence_apc_snmp: Add Tripplite PDU support
Marek 'marx' Grac (15):
fencing: Issue with login when autodetection of EOL is used
fence_drac5: Add support for Dell DRAC MC model
fence_drac5: Remove debug info
fencing: Add support for options which should be selected from a list of values
fencing: Add information about option that have to be selected from list to XML metadata
fencing: Add support for ipmitool/amttool binaries during autoconf
fence_virsh: Add UUID support for fence_virsh
fencing: Do not use public keys when identity-file is not defined
fencing: Fix replacement of path to ipmitool/amttool
fence_ipmilan: Adapt Makefile from C to Python fence agent
fence_ipmilan: Remove old fence agent
fence_amt: Adapt environment and build system to incorporate fence_amt
fencing: Error messages should be send to STDERR by default
fence_ipmilan: Improve readibility of verbose output
fence_ipmilan: auth type should not have default
Ondrej Mular (7):
fencing: new option --method
fencing: add function is_executale
fence_ipmilan: port to fencing library
fence_amt: new fence agent for Intel AMT
fencing: method cycle can be used with maximum 1 plug
fence_amt: add long description
fence_ipmilan: add long description
10 years, 5 months
fence-agents: master - fence_ipmilan: add long description
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=626035...
Commit: 626035de9ad2dab222f79814afa6a1820d252a8a
Parent: 293325ff5be7a65a9a5300b40ebb7ee7907c832e
Author: Ondrej Mular <omular(a)redhat.com>
AuthorDate: Fri Jan 10 05:44:11 2014 -0500
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jan 10 13:52:49 2014 +0100
fence_ipmilan: add long description
Signed-off-by: Marek 'marx' Grac <mgrac(a)redhat.com>
---
fence/agents/ipmilan/fence_ipmilan.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index 7b50772..e15dc94 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -180,7 +180,9 @@ def main():
docs = { }
docs["shortdesc"] = "Fence agent for IPMI"
- docs["longdesc"] = "Fence agent for 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/)."
docs["vendorurl"] = ""
docs["symlink"] = [("fence_ilo3", "Fence agent for HP iLO3"),
("fence_ilo4", "Fence agent for HP iLO4"),
10 years, 5 months
fence-agents: master - fence_amt: add long description
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=293325...
Commit: 293325ff5be7a65a9a5300b40ebb7ee7907c832e
Parent: fdd1e82d67d19cf7e3ca685c120f8f36fe9ed6d6
Author: Ondrej Mular <omular(a)redhat.com>
AuthorDate: Fri Jan 10 05:44:09 2014 -0500
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jan 10 13:52:47 2014 +0100
fence_amt: add long description
Signed-off-by: Marek 'marx' Grac <mgrac(a)redhat.com>
---
fence/agents/amt/fence_amt.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fence/agents/amt/fence_amt.py b/fence/agents/amt/fence_amt.py
index c164c66..81b8aec 100644
--- a/fence/agents/amt/fence_amt.py
+++ b/fence/agents/amt/fence_amt.py
@@ -134,7 +134,9 @@ def main():
docs = { }
docs["shortdesc"] = "Fence agent for AMT"
- docs["longdesc"] = "Fence agent for AMT"
+ docs["longdesc"] = "fence_amt is an I/O Fencing agent \
+which can be used with Intel AMT. This agent calls support software amttool\
+(http://www.kraxel.org/cgit/amtterm/)."
docs["vendorurl"] = "http://www.intel.com/"
show_docs(options, docs)
10 years, 5 months
fence-agents: master - fencing: method cycle can be used with maximum 1 plug
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=fdd1e8...
Commit: fdd1e82d67d19cf7e3ca685c120f8f36fe9ed6d6
Parent: 84f98fa327e0167f617a9f57afb1473e76422ed0
Author: Ondrej Mular <omular(a)redhat.com>
AuthorDate: Fri Jan 10 05:44:06 2014 -0500
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jan 10 13:52:42 2014 +0100
fencing: method cycle can be used with maximum 1 plug
Checks input for invalid usage of cycle (method cycle and plug).
Signed-off-by: Marek 'marx' Grac <mgrac(a)redhat.com>
---
fence/agents/lib/fencing.py.py | 27 ++++++---------------------
1 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 5410176..9cc7407 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -348,7 +348,7 @@ all_opt = {
"longopt" : "method",
"help" : "-m, --method=[method] Method to fence (onoff|cycle) (Default: onoff)",
"required" : "0",
- "shortdesc" : "Method to fence (onoff|cycle) (Default: onoff)",
+ "shortdesc" : "Method to fence (onoff|cycle)",
"default" : "onoff",
"choices" : [ "onoff", "cycle" ],
"order" : 1}
@@ -732,6 +732,9 @@ def check_input(device_opt, opt):
else:
options["--ipport"] = 23
+ if options.has_key("--plug") and len(options["--plug"].split(",")) > 1 and options.has_key("--method") and options["--method"] == "cycle":
+ fail_usage("Failed: Cannot use --method cycle for more than 1 plug")
+
for opt in device_opt:
if all_opt[opt].has_key("choices"):
long = "--" + all_opt[opt]["longopt"]
@@ -789,24 +792,6 @@ def set_multi_power_fn(tn, options, set_power_fn):
else:
set_power_fn(tn, options)
-def multi_reboot_cycle_fn(tn, options, reboot_cycle_fn):
- success = False;
- if options.has_key("--plugs"):
- for plug in options["--plugs"]:
- try:
- options["--uuid"] = str(uuid.UUID(plug))
- except ValueError:
- pass
- except KeyError:
- pass
- options["--plug"] = plug
- plug_status = reboot_cycle_fn(tn, options)
- if plug_status:
- success = plug_status
- else:
- success = reboot_cycle_fn(tn, options)
- return success
-
def show_docs(options, docs = None):
device_opt = options["device_opt"]
@@ -890,9 +875,9 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None
fail(EC_WAITING_OFF)
elif options["--action"] == "reboot":
power_on = False
- if options.has_key("--method") and options["--method"].lower() == "cycle":
+ if options.has_key("--method") and options["--method"].lower() == "cycle" and reboot_cycle_fn is not None:
for _ in range(1, 1 + int(options["--retry-on"])):
- if multi_reboot_cycle_fn(tn, options, reboot_cycle_fn):
+ if reboot_cycle_fn(tn, options):
power_on = True
break
10 years, 5 months
cluster: RHEL6 - man: update fence_node man page
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=88d1e87314a...
Commit: 88d1e87314a1088ea50b2c29c6b0205c9b34281c
Parent: 3118b7849b85b4dfc3d1b6979a64ebea893dce0e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 9 16:49:19 2014 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Jan 9 16:49:19 2014 -0600
man: update fence_node man page
Document -S, -m, -e.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/man/fence_node.8 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/man/fence_node.8 b/fence/man/fence_node.8
index fe26198..4a07313 100644
--- a/fence/man/fence_node.8
+++ b/fence/man/fence_node.8
@@ -76,6 +76,15 @@ Performed by a cluster node "against" itself during startup (by the cman init sc
.B \-U
Unfence the node, default local node name.
.TP
+.B \-S
+Run status on node name.
+.TP
+.BI \-m " num"
+Method number, starting from 1 (use with -S).
+.TP
+.BI \-e " 0|1"
+Enable/disable fenced_external notification.
+.TP
.B \-v
Show fence agent results, \-vv to also show agent args.
.TP
10 years, 5 months
fence-agents: master - fence_ipmilan: auth type should not have default
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=84f98f...
Commit: 84f98fa327e0167f617a9f57afb1473e76422ed0
Parent: a709de06cd8f810b653613b07fba6fc13fc0fdf2
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 8 17:43:12 2014 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jan 8 17:43:12 2014 +0100
fence_ipmilan: auth type should not have default
When auth type has a default value set to 'none' then autodetect of auth type is not
done. If user want to user password, he had to enter -A password, with this patch this is
not necessary (as in previous C-based implementation)
---
fence/agents/ipmilan/fence_ipmilan.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index f711312..7b50772 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -127,7 +127,6 @@ def define_new_opts():
"help" : "-A, --auth=[auth] IPMI Lan Auth type (md5|password|none)",
"required" : "0",
"shortdesc" : "IPMI Lan Auth type.",
- "default" : "none",
"choices" : ["md5", "password", "none"],
"order": 1
}
10 years, 5 months
fence-agents: master - fence_ipmilan: Improve readibility of verbose output
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a709de...
Commit: a709de06cd8f810b653613b07fba6fc13fc0fdf2
Parent: 3f7eed8b8b51e41b6dceab0a36886a0027141d12
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 8 17:42:41 2014 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jan 8 17:42:41 2014 +0100
fence_ipmilan: Improve readibility of verbose output
---
fence/agents/ipmilan/fence_ipmilan.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index ece5d97..f711312 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -27,7 +27,7 @@ def get_power_status(_, options):
out = process.communicate()
process.stdout.close()
- options["debug_fh"].write(out)
+ options["debug_fh"].write(str(out) + "\n")
match = re.search('[Cc]hassis [Pp]ower is [\\s]*([a-zA-Z]{2,3})', str(out))
status = match.group(1) if match else None
@@ -65,7 +65,7 @@ def reboot_cycle(_, options):
out = process.communicate()
process.stdout.close()
- options["debug_fh"].write(out)
+ options["debug_fh"].write(str(out) + "\n")
return bool(re.search('chassis power control: cycle', str(out).lower()))
10 years, 5 months
fence-agents: master - fencing: Error messages should be send to STDERR by default
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=3f7eed...
Commit: 3f7eed8b8b51e41b6dceab0a36886a0027141d12
Parent: 806d293da6ea7d5e5259faf806e17b40c45ae536
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 8 17:02:47 2014 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Jan 8 17:02:47 2014 +0100
fencing: Error messages should be send to STDERR by default
Previously, it was sent to STDERR only when debug file was not set and --verbose was not set.
---
fence/agents/lib/fencing.py.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index ad5dd10..5410176 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -716,7 +716,7 @@ def check_input(device_opt, opt):
except IOError:
fail_usage("Failed: Unable to create file " + options["--debug-file"])
- if options.has_key("--verbose") and options.has_key("debug_fh") == 0:
+ if options.has_key("debug_fh") == 0:
options["debug_fh"] = sys.stderr
if options.has_key("--snmp-priv-passwd-script"):
10 years, 5 months