public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jan Friesse <honzaf@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: RHEL5 - fence_ipmi: Increased number of retries to action
Date: Wed, 11 Feb 2009 09:48:00 -0000	[thread overview]
Message-ID: <20090211094747.831BD120198@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0b4e73be76b08553f4d22b6ba044e2d5f7c8bfae
Commit:        0b4e73be76b08553f4d22b6ba044e2d5f7c8bfae
Parent:        2a217af6683e519769dd96ff81d84c09fc09d499
Author:        Jan Friesse <jfriesse@redhat.com>
AuthorDate:    Wed Feb 11 10:47:24 2009 +0100
Committer:     Jan Friesse <jfriesse@redhat.com>
CommitterDate: Wed Feb 11 10:47:24 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#276541
---
 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);
 


                 reply	other threads:[~2009-02-11  9:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090211094747.831BD120198@lists.fedorahosted.org \
    --to=honzaf@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).