From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/fence/agents/bullpap fence_bullpap.pl
Date: 28 Sep 2007 22:38:17 -0000 [thread overview]
Message-ID: <20070928223817.28655.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-09-28 22:38:17
Modified files:
fence/agents/bullpap: fence_bullpap.pl
Log message:
Backport the fence_bullpap agent from the RHEL51 branch. This version fixes a timeout bug.
Fixes bz309261
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/bullpap/fence_bullpap.pl.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.7&r2=1.1.2.8
--- cluster/fence/agents/bullpap/fence_bullpap.pl 2007/02/12 20:33:57 1.1.2.7
+++ cluster/fence/agents/bullpap/fence_bullpap.pl 2007/09/28 22:38:17 1.1.2.8
@@ -323,27 +323,24 @@
my $timeout = 60; # 60 seconds for "off" for 32-way bull machines
set_power_state $host,$domain,"off",$login,$passwd;
- if ( $? == 0 )
- {
+ do {
+ sleep 5;
+ $state=get_power_state $host,$domain,$login,$passwd;
+ $timeout -= 5;
+ } while ($timeout > 0 && $state != 0);
+
+ if ($timeout <= 0) {
+ $success = 0;
+ } else {
+ $timeout = 120; # 120 seconds for on, for 32-way bull machines
+ set_power_state $host,$domain,"on",$login,$passwd;
do {
sleep 5;
$state=get_power_state $host,$domain,$login,$passwd;
$timeout -= 5;
- } while ($timeout > 0 && !($state =~ /^off$/i));
+ } while ($timeout > 0 && $state != 0);
- if ($timeout > 0) {
- $timeout = 120; # 120 seconds for on, for 32-way bull machines
- set_power_state $host,$domain,"on",$login,$passwd;
- if ( $? == 0 )
- {
- do {
- sleep 5;
- $state=get_power_state $host,$domain,$login,$passwd;
- $timeout -= 5;
- } while ($timeout > 0 && !($state =~ /^on$/i));
- $success = 1 if ($state =~ /^on$/i);
- }
- }
+ $success = 1 if ($state == 0);
}
}
elsif (/status/)
reply other threads:[~2007-09-28 22:38 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=20070928223817.28655.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/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 NNTP newsgroup(s).