* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-02-19 17:09 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-02-19 17:09 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-02-19 17:09:00
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Support power on/reboot for iLO2
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&r1=1.6&r2=1.7
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/02/12 20:17:06 1.6
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/02/19 17:08:59 1.7
@@ -346,13 +346,15 @@
# 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 )
+ if ($ribcl_vers < 2.21)
{
sendsock $socket, "<SET_HOST_POWER HOST_POWER = \"$state\"/>\n";
}
else
{
- if ($state eq "Y" )
+ if ($ribcl_vers > 2.21) {
+ sendsock $socket, "<HOLD_PWR_BTN/>\n";
+ } elsif ($state eq "Y" )
{
sendsock $socket, "<PRESS_PWR_BTN/>\n";
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2008-01-15 16:21 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2008-01-15 16:21 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2008-01-15 16:21:17
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
fix bz428243: fence_ilo can not recognize option="off" but fence_wti can
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.5&r2=1.3.2.6
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/06/25 21:57:12 1.3.2.5
+++ cluster/fence/agents/ilo/fence_ilo.pl 2008/01/15 16:21:17 1.3.2.6
@@ -476,7 +476,7 @@
exit 2;
}
- elsif ($name eq "action" )
+ elsif ($name eq "action" || $name eq "option")
{
$action = $val;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2008-01-15 16:18 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2008-01-15 16:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2008-01-15 16:18:34
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Allow "option=(on|off|reboot)" (currently only fence_ilo takes "action")
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&r1=1.10&r2=1.11
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/08/22 08:58:39 1.10
+++ cluster/fence/agents/ilo/fence_ilo.pl 2008/01/15 16:18:34 1.11
@@ -476,7 +476,7 @@
exit 2;
}
- elsif ($name eq "action" )
+ elsif ($name eq "action" || $name eq "option")
{
$action = $val;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-07-17 18:38 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-07-17 18:38 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL45
Changes by: rmccabe at sourceware.org 2007-07-17 18:38:59
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Fix for 246246
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.3.2.3.2.1&r2=1.3.2.3.2.2
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/04/09 15:22:39 1.3.2.3.2.1
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/07/17 18:38:59 1.3.2.3.2.2
@@ -279,10 +279,13 @@
foreach my $line (@response)
{
+ if ($line =~ /FIRMWARE_VERSION\s*=\s*\"(.*)\"/) {
+ $firmware_rev = $1;
+ }
if ($line =~ /MANAGEMENT_PROCESSOR\s*=\s*\"(.*)\"/) {
if ($1 eq "iLO2") {
$ilo_vers = 2;
- print "power_status: reporting iLO2\n" if ($verbose);
+ print "power_status: reporting iLO2 $firmware_rev\n" if ($verbose);
}
}
@@ -358,7 +361,11 @@
# 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";
+ if ($firmware_rev > 1.29) {
+ sendsock $socket, "<HOLD_PWR_BTN TOGGLE=\"Yes\" />\n";
+ } else {
+ 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
@@ -515,6 +522,7 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
$ilo_vers = 1;
+$firmware_rev = 0;
if (@ARGV > 0) {
getopts("a:hl:n:o:p:S:r:qvV") || fail_usage ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-06-25 21:57 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-06-25 21:57 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-06-25 21:57:12
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Update to support iLO 2 > 1.29
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.4&r2=1.3.2.5
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/04/04 19:24:09 1.3.2.4
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/06/25 21:57:12 1.3.2.5
@@ -279,10 +279,13 @@
foreach my $line (@response)
{
+ if ($line =~ /FIRMWARE_VERSION\s*=\s*\"(.*)\"/) {
+ $firmware_rev = $1;
+ }
if ($line =~ /MANAGEMENT_PROCESSOR\s*=\s*\"(.*)\"/) {
if ($1 eq "iLO2") {
$ilo_vers = 2;
- print "power_status: reporting iLO2\n" if ($verbose);
+ print "power_status: reporting iLO2 $firmware_rev\n" if ($verbose);
}
}
@@ -358,7 +361,11 @@
# 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";
+ if ($firmware_rev > 1.29) {
+ sendsock $socket, "<HOLD_PWR_BTN TOGGLE=\"Yes\" />\n";
+ } else {
+ 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
@@ -515,6 +522,7 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
$ilo_vers = 1;
+$firmware_rev = 0;
if (@ARGV > 0) {
getopts("a:hl:n:o:p:S:r:qvV") || fail_usage ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-06-25 21:48 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-06-25 21:48 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-06-25 21:48:26
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
HP changed the iLO 2 interface again in the latest firmware revision, 1.30 (released on 2007-06-01)
I tested this on iLO 2 firmware revisions 1.26, 1.29, and 1.30
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.1&r2=1.5.2.2
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/05/10 19:42:24 1.5.2.1
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/06/25 21:48:26 1.5.2.2
@@ -1,4 +1,17 @@
#!/usr/bin/perl
+
+###############################################################################
+###############################################################################
+##
+## Copyright (C) 2006-2007 Red Hat, Inc. All rights reserved.
+##
+## This copyrighted material is made available to anyone wishing to use,
+## modify, copy, or redistribute it subject to the terms and conditions
+## of the GNU General Public License v.2.
+##
+###############################################################################
+###############################################################################
+
$|=1;
eval { $ssl_mod="Net::SSL" if require Net::SSL} ||
@@ -14,6 +27,9 @@
# "#END_VERSION_GENERATION" It is generated by the Makefile
#BEGIN_VERSION_GENERATION
+$FENCE_RELEASE_NAME="";
+$REDHAT_COPYRIGHT="";
+$BUILD_DATE="";
#END_VERSION_GENERATION
# Get the program name from $0 and strip directory names
@@ -35,6 +51,7 @@
print " -l <name> Login name\n";
print " -o <string> Action: reboot (default), off, on or status\n";
print " -p <string> Login password\n";
+ print " -S <path> Script to run to retrieve login password\n";
print " -q quiet mode\n";
print " -V version\n";
print " -v verbose\n";
@@ -62,7 +79,7 @@
sub version
{
print "$pname $FENCE_RELEASE_NAME $BUILD_DATE\n";
- print "$SISTINA_COPYRIGHT\n" if ( $SISTINA_COPYRIGHT );
+ print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
exit 0;
}
@@ -262,10 +279,13 @@
foreach my $line (@response)
{
+ if ($line =~ /FIRMWARE_VERSION\s*=\s*\"(.*)\"/) {
+ $firmware_rev = $1;
+ }
if ($line =~ /MANAGEMENT_PROCESSOR\s*=\s*\"(.*)\"/) {
if ($1 eq "iLO2") {
$ilo_vers = 2;
- print "power_status: reporting iLO2\n" if ($verbose);
+ print "power_status: reporting iLO2 $firmware_rev\n" if ($verbose);
}
}
@@ -341,7 +361,11 @@
# 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";
+ if ($firmware_rev > 1.29) {
+ sendsock $socket, "<HOLD_PWR_BTN TOGGLE=\"Yes\" />\n";
+ } else {
+ 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
@@ -472,6 +496,10 @@
{
$passwd = $val;
}
+ elsif ($name eq "passwd_script" )
+ {
+ $passwd_script = $val;
+ }
elsif ($name eq "ribcl" )
{
$ribcl_vers = $val;
@@ -490,9 +518,10 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
$ilo_vers = 1;
+$firmware_rev = 0;
if (@ARGV > 0) {
- getopts("a:hl:n:o:p:r:qvV") || fail_usage ;
+ getopts("a:hl:n:o:p:S:r:qvV") || fail_usage ;
usage if defined $opt_h;
version if defined $opt_V;
@@ -505,7 +534,15 @@
fail_usage "No '-l' flag specified." unless defined $opt_l;
$username = $opt_l;
- fail_usage "No '-p' flag specified." unless defined $opt_p;
+ if (defined $opt_S) {
+ $pwd_script_out = `$opt_S`;
+ chomp($pwd_script_out);
+ if ($pwd_script_out) {
+ $opt_p = $pwd_script_out;
+ }
+ }
+
+ fail_usage "No '-p' or '-S' flag specified." unless defined $opt_p;
$passwd = $opt_p;
$action = $opt_o if defined $opt_o;
@@ -525,6 +562,15 @@
fail "no host\n" unless defined $hostname;
fail "no login name\n" unless defined $username;
+
+ if (defined $passwd_script) {
+ $pwd_script_out = `$passwd_script`;
+ chomp($pwd_script_out);
+ if ($pwd_script_out) {
+ $passwd = $pwd_script_out;
+ }
+ }
+
fail "no password\n" unless defined $passwd;
fail "unrecognised action: $action\n"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-06-25 21:47 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-06-25 21:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-06-25 21:47:09
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
HP changed the iLO 2 interface again in the latest firmware revision, 1.30 (released on 2007-06-01)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&r1=1.8&r2=1.9
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/04/04 19:15:00 1.8
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/06/25 21:47:09 1.9
@@ -279,10 +279,13 @@
foreach my $line (@response)
{
+ if ($line =~ /FIRMWARE_VERSION\s*=\s*\"(.*)\"/) {
+ $firmware_rev = $1;
+ }
if ($line =~ /MANAGEMENT_PROCESSOR\s*=\s*\"(.*)\"/) {
if ($1 eq "iLO2") {
$ilo_vers = 2;
- print "power_status: reporting iLO2\n" if ($verbose);
+ print "power_status: reporting iLO2 $firmware_rev\n" if ($verbose);
}
}
@@ -358,7 +361,11 @@
# 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";
+ if ($firmware_rev > 1.29) {
+ sendsock $socket, "<HOLD_PWR_BTN TOGGLE=\"Yes\" />\n";
+ } else {
+ 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
@@ -511,6 +518,7 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
$ilo_vers = 1;
+$firmware_rev = 0;
if (@ARGV > 0) {
getopts("a:hl:n:o:p:S:r:qvV") || fail_usage ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-04-09 15:22 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-04-09 15:22 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL45
Changes by: rmccabe at sourceware.org 2007-04-09 16:22:39
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Fix for bz235271: Regression in fence_ilo
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.3.2.3&r2=1.3.2.3.2.1
--- 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/09 15:22:39 1.3.2.3.2.1
@@ -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 ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-04-09 15:20 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-04-09 15:20 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: rmccabe at sourceware.org 2007-04-09 16:20:09
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Fix for bz235271: Regression in fence_ilo
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.5&r2=1.5.4.1
--- cluster/fence/agents/ilo/fence_ilo.pl 2006/08/16 19:11:49 1.5
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/04/09 15:20:09 1.5.4.1
@@ -262,6 +262,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;
@@ -326,10 +333,20 @@
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";
}
@@ -384,6 +401,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";
@@ -469,6 +489,7 @@
$action = "reboot";
$ribcl_vers = undef; # undef = autodetect
+$ilo_vers = 1;
if (@ARGV > 0) {
getopts("a:hl:n:o:p:r:qvV") || fail_usage ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-04-04 19:24 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-04-04 19:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
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 ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-04-04 19:15 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-04-04 19:15 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-04-04 20:15:01
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&r1=1.7&r2=1.8
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/02/19 17:08:59 1.7
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/04/04 19:15:00 1.8
@@ -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";
@@ -492,6 +510,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 ;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2007-02-20 22:02 rmccabe
0 siblings, 0 replies; 13+ messages in thread
From: rmccabe @ 2007-02-20 22:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-02-20 22:02:55
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
- Support for HP ilo2
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.2&r2=1.3.2.3
--- cluster/fence/agents/ilo/fence_ilo.pl 2007/02/12 20:33:58 1.3.2.2
+++ cluster/fence/agents/ilo/fence_ilo.pl 2007/02/20 22:02:54 1.3.2.3
@@ -346,13 +346,15 @@
# 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 )
+ if ($ribcl_vers < 2.21)
{
sendsock $socket, "<SET_HOST_POWER HOST_POWER = \"$state\"/>\n";
}
else
{
- if ($state eq "Y" )
+ if ($ribcl_vers > 2.21) {
+ sendsock $socket, "<HOLD_PWR_BTN/>\n";
+ } elsif ($state eq "Y" )
{
sendsock $socket, "<PRESS_PWR_BTN/>\n";
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl
@ 2006-08-16 19:11 jparsons
0 siblings, 0 replies; 13+ messages in thread
From: jparsons @ 2006-08-16 19:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: jparsons at sourceware.org 2006-08-16 19:11:50
Modified files:
fence/agents/ilo: fence_ilo.pl
Log message:
Ignore unused args to stdin
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ilo/fence_ilo.pl.diff?cvsroot=cluster&r1=1.4&r2=1.5
--- cluster/fence/agents/ilo/fence_ilo.pl 2005/07/28 21:49:09 1.4
+++ cluster/fence/agents/ilo/fence_ilo.pl 2006/08/16 19:11:49 1.5
@@ -461,10 +461,6 @@
$verbose = $val;
}
- else
- {
- fail "parse error: unknown option \"$opt\"\n";
- }
}
}
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-01-15 16:21 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 17:09 [Cluster-devel] cluster/fence/agents/ilo fence_ilo.pl rmccabe
-- strict thread matches above, loose matches on Subject: below --
2008-01-15 16:21 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:24 rmccabe
2007-04-04 19:15 rmccabe
2007-02-20 22:02 rmccabe
2006-08-16 19:11 jparsons
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.