Author: arkurth
Date: Mon Sep 14 18:21:29 2009
New Revision: 814767
URL: http://svn.apache.org/viewvc?rev=814767&view=rev
Log:
VCL-226
Added check for "computer is processing another action" error in
Windows.pm::reboot(). If this error occurs a power reset is issued.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=814767&r1=814766&r2=814767&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Mon Sep 14
18:21:29 2009
@@ -2630,6 +2630,20 @@
if (defined($shutdown_exit_status) && $shutdown_exit_status ==
0) {
notify($ERRORS{'OK'}, 0, "executed reboot command on
$computer_node_name");
}
+ elsif (defined($shutdown_output) && grep(/processing another
action/, @$shutdown_output)) {
+ # The following message may be displayed causing the
reboot to fail:
+ # The computer is processing another action and thus
cannot be shut down. Wait until the computer has finished its action, and then
try again.(21)
+ notify($ERRORS{'WARNING'}, 0, "unable to reboot because
of processing another action error on $computer_node_name, computer will be
forcefully restarted, exit status: $shutdown_exit_status,
output:\...@{$shutdown_output}");
+
+ # Call provisioning module's power_reset() subroutine
+ if ($self->provisioner->power_reset()) {
+ notify($ERRORS{'OK'}, 0, "initiated power reset
on $computer_node_name");
+ }
+ else {
+ notify($ERRORS{'WARNING'}, 0, "reboot failed,
failed to initiate power reset on $computer_node_name");
+ return 0;
+ }
+ }
elsif (defined($shutdown_exit_status)) {
notify($ERRORS{'WARNING'}, 0, "failed to execute reboot
command on $computer_node_name, exit status: $shutdown_exit_status,
output:\...@{$shutdown_output}");
return 0;