From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12172 invoked by alias); 9 Feb 2009 14:04:19 -0000 Received: (qmail 12165 invoked by alias); 9 Feb 2009 14:04:19 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: cluster: STABLE2 - fence_ipmi: Increased number of retries to action To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE2 X-Git-Reftype: branch X-Git-Oldrev: a9dcdf4cf75801d8ea1a8688e0090d4d6d515d91 X-Git-Newrev: 1afc9a2aaed37a4ab7e1856fa80648d5c0c7be30 From: Jan Friesse Message-Id: <20090209140358.A7025C024D@lists.fedorahosted.org> Date: Mon, 09 Feb 2009 14:04:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00398.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1afc9a2aaed37a4ab7e1856fa80648d5c0c7be30 Commit: 1afc9a2aaed37a4ab7e1856fa80648d5c0c7be30 Parent: a9dcdf4cf75801d8ea1a8688e0090d4d6d515d91 Author: Jan Friesse AuthorDate: Mon Feb 9 15:01:12 2009 +0100 Committer: Jan Friesse CommitterDate: Mon Feb 9 15:03:47 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. --- 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 893b11e..6e43a8b 100644 --- a/fence/agents/ipmilan/ipmilan.c +++ b/fence/agents/ipmilan/ipmilan.c @@ -366,7 +366,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) { @@ -378,12 +378,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); @@ -408,7 +408,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) { @@ -420,12 +420,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);