Author: fapeeler
Date: Wed Nov 28 19:33:06 2012
New Revision: 1414877
URL: http://svn.apache.org/viewvc?rev=1414877&view=rev
Log:
VCL-652
switched to using power_off and power_on routines
Modified:
vcl/branches/vcl-2.3-bugfixes/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
Modified:
vcl/branches/vcl-2.3-bugfixes/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
URL:
http://svn.apache.org/viewvc/vcl/branches/vcl-2.3-bugfixes/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm?rev=1414877&r1=1414876&r2=1414877&view=diff
==============================================================================
---
vcl/branches/vcl-2.3-bugfixes/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
(original)
+++
vcl/branches/vcl-2.3-bugfixes/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
Wed Nov 28 19:33:06 2012
@@ -379,7 +379,7 @@ sub load {
insertloadlog($reservation_id,
$computer_id, "failed", "failed to start load process on $computer_node_name");
return 0;
}
- if ($_ =~ /nodeset failure/) {
+ if ($_ =~ /failure/) {
my $success = 0;
notify($ERRORS{'OK'}, 0,
"rinstall's nodeset failed - trying nodeset directly: ($_)");
if (open(NODESET,
"$XCAT_ROOT/sbin/nodeset $computer_node_name install 2>&1 |")) {
@@ -401,23 +401,9 @@ sub load {
}
if ($success) {
$success = 0;
- if (open(RPOWER,
"$XCAT_ROOT/bin/rpower $computer_node_name boot 2>&1 |")) {
- while
(<RPOWER>) {
-
chomp($_);
- if ($_
=~ /$computer_node_name:.* on/) {
-
$success = 1;
-
notify($ERRORS{'OK'}, 0, "node power set to boot");
- }
- }
- close(RPOWER);
- } ## end if
(open(RPOWER, "$XCAT_ROOT/bin/rpower $computer_node_name boot 2>&1 |"...
- else {
-
notify($ERRORS{'CRITICAL'}, 0, "failed to open rpower directly");
- close(RINSTALL);
- close(SEM);
-
insertloadlog($reservation_id, $computer_id, "failed", "failed to start load
process on $computer_node_name");
- return 0;
- }
+ if($self->power_off()) {
+ $success = 1 if($self->power_on());
+ }
} ## end if ($success)
else {
notify($ERRORS{'CRITICAL'}, 0, "direct call of nodeset failed ($_)");