From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
Date: 4 Apr 2007 19:24:09 -0000 [thread overview]
Message-ID: <20070404192409.1089.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-04-04 20:24:09
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Make power on work correctly for RIBCL version 2.22 on both iLO2 and iLO:
for the former, HOLD_PWR_BTN is used to both power the machine on and off;
when the power is off, PRESS_PWR_BUTTON has no effect. For the latter,
HOLD_PWR_BUTTON is used to power the machine off, and PRESS_PWR_BUTTON is
used to power the machine on; when the power is off, HOLD_PWR_BUTTON
has no effect.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.3&r2=1.3.2.4
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/02/20 22:02:54 1.3.2.3
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/04/04 19:24:09 1.3.2.4
@@ -279,6 +279,13 @@
foreach my $line (@response)
{
+ if ($line =~ /MANAGEMENT_PROCESSOR\s*=\s*\"(.*)\"/) {
+ if ($1 eq "iLO2") {
+ $ilo_vers = 2;
+ print "power_status: reporting iLO2\n" if ($verbose);
+ }
+ }
+
if ($line =~ /MESSAGE='(.*)'/)
{
my $msg = $1;
@@ -343,18 +350,26 @@
sendsock $socket, "<LOGIN USER_LOGIN = \"$username\" PASSWORD = \"$passwd\">\n";
sendsock $socket, "<SERVER_INFO MODE = \"write\">\n";
+ if ($ilo_vers == 2) {
+ # iLO2 with RIBCL v2.22 behaves differently from
+ # iLO with RIBCL v2.22. For the former, HOLD_PWR_BTN is
+ # used to both power the machine on and off; when the power
+ # is off, PRESS_PWR_BUTTON has no effect. For the latter,
+ # HOLD_PWR_BUTTON is used to power the machine off, and
+ # PRESS_PWR_BUTTON is used to power the machine on;
+ # when the power is off, HOLD_PWR_BUTTON has no effect.
+ sendsock $socket, "<HOLD_PWR_BTN/>\n";
+ }
# As of firmware version 1.71 (RIBCL 2.21) The SET_HOST_POWER command
# is no longer available. HOLD_PWR_BTN and PRESS_PWR_BTN are used
# instead now :(
- if ($ribcl_vers < 2.21)
+ elsif ($ribcl_vers < 2.21)
{
sendsock $socket, "<SET_HOST_POWER HOST_POWER = \"$state\"/>\n";
}
else
{
- if ($ribcl_vers > 2.21) {
- sendsock $socket, "<HOLD_PWR_BTN/>\n";
- } elsif ($state eq "Y" )
+ if ($state eq "Y" )
{
sendsock $socket, "<PRESS_PWR_BTN/>\n";
}
@@ -403,6 +418,9 @@
sendsock $socket, "<RIBCL VERSION=\"2.0\">\n";
}
sendsock $socket, "<LOGIN USER_LOGIN = \"$username\" PASSWORD = \"$passwd\">\n";
+ if ($ribcl_vers >= 2) {
+ sendsock $socket, "<RIB_INFO MODE=\"read\"><GET_FW_VERSION/></RIB_INFO>\n";
+ }
sendsock $socket, "<SERVER_INFO MODE = \"read\">\n";
sendsock $socket, "<GET_HOST_POWER_STATUS/>\n";
sendsock $socket, "</SERVER_INFO>\n";
@@ -496,6 +514,7 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
+$ilo_vers = 1;
if (@ARGV > 0) {
getopts("a:hl:n:o:p:S:r:qvV") || fail_usage ;
next reply other threads:[~2007-04-04 19:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 19:24 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-15 16:21 [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl rmccabe
2008-01-15 16:18 rmccabe
2007-07-17 18:38 rmccabe
2007-06-25 21:57 rmccabe
2007-06-25 21:48 rmccabe
2007-06-25 21:47 rmccabe
2007-04-09 15:22 rmccabe
2007-04-09 15:20 rmccabe
2007-04-04 19:15 rmccabe
2007-02-20 22:02 rmccabe
2007-02-19 17:09 rmccabe
2006-08-16 19:11 jparsons
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=20070404192409.1089.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.