This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: RHEL4 - fence_ipmi: Increased number of retries to action
- From: Jan Friesse <honzaf at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Wed, 11 Feb 2009 09:51:23 +0000 (UTC)
- Subject: cluster: RHEL4 - fence_ipmi: Increased number of retries to action
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f5c4139a8d94d7ef53ffe50b2f41a5a1cd57ad4a
Commit: f5c4139a8d94d7ef53ffe50b2f41a5a1cd57ad4a
Parent: 27e2be9704af2d3032af0ce59894e443166863dd
Author: Jan Friesse <jfriesse@redhat.com>
AuthorDate: Wed Feb 11 10:50:49 2009 +0100
Committer: Jan Friesse <jfriesse@redhat.com>
CommitterDate: Wed Feb 11 10:50:49 2009 +0100
fence_ipmi: Increased number of retries to action
This patch is originally provided by Kris Lindgren. It
increases number of retries to 7 and make time between
operation and status shorter. It makes more calls, if
IPMI seems not to react.
rhbz#472370
---
fence/agents/ipmilan/ipmilan.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index cbacf08..2beb15a 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -380,7 +380,7 @@ ipmi_op(struct ipmi *ipmi, int op, struct Etoken *toklist)
static int
ipmi_off(struct ipmi *ipmi)
{
- int ret, retries = 5;
+ int ret, retries = 7;
ret = ipmi_op(ipmi, ST_STATUS, power_status);
switch(ret) {
@@ -392,12 +392,12 @@ ipmi_off(struct ipmi *ipmi)
return ret;
}
- ret = ipmi_op(ipmi, ST_POWEROFF, power_off_complete);
- if (ret != 0)
- return ret;
-
while (retries>=0) {
- sleep(5);
+ ret = ipmi_op(ipmi, ST_POWEROFF, power_off_complete);
+ if (ret != 0)
+ return ret;
+
+ sleep(2);
--retries;
ret = ipmi_op(ipmi, ST_STATUS, power_status);
@@ -422,7 +422,7 @@ ipmi_off(struct ipmi *ipmi)
static int
ipmi_on(struct ipmi *ipmi)
{
- int ret, retries = 5;
+ int ret, retries = 7;
ret = ipmi_op(ipmi, ST_STATUS, power_status);
switch(ret) {
@@ -434,12 +434,12 @@ ipmi_on(struct ipmi *ipmi)
return ret;
}
- ret = ipmi_op(ipmi, ST_POWERON, power_on_complete);
- if (ret != 0)
- return ret;
-
while (retries>=0) {
- sleep(5);
+ ret = ipmi_op(ipmi, ST_POWERON, power_on_complete);
+ if (ret != 0)
+ return ret;
+
+ sleep(2);
--retries;
ret = ipmi_op(ipmi, ST_STATUS, power_status);