Author: arkurth
Date: Fri Apr 14 21:13:46 2017
New Revision: 1791417
URL: http://svn.apache.org/viewvc?rev=1791417&view=rev
Log:
VCL-874
Moved the call to change the computer state to 'reloading' to before when an
image may be transferred from another management node.
Modified:
vcl/trunk/managementnode/lib/VCL/new.pm
Modified: vcl/trunk/managementnode/lib/VCL/new.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/new.pm?rev=1791417&r1=1791416&r2=1791417&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/new.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/new.pm Fri Apr 14 21:13:46 2017
@@ -525,6 +525,17 @@ sub reload_image {
return;
}
+ # Update the computer state to reloading
+ if (update_computer_state($computer_id, "reloading")) {
+ notify($ERRORS{'OK'}, 0, "computer $computer_short_name
state set to reloading");
+ insertloadlog($reservation_id, $computer_id, "info",
"computer state updated to reloading");
+ }
+ else {
+ notify($ERRORS{'CRITICAL'}, 0, "unable to set
$computer_short_name into reloading state, returning");
+ insertloadlog($reservation_id, $computer_id, "failed",
"unable to set computer $computer_short_name state to reloading");
+ return;
+ }
+
# Make sure the image exists on this management node's local
disks
# Attempt to retrieve it if necessary
if ($self->provisioner->can("does_image_exist")) {
@@ -574,17 +585,6 @@ sub reload_image {
}
}
- # Update the computer state to reloading
- if (update_computer_state($computer_id, "reloading")) {
- notify($ERRORS{'OK'}, 0, "computer $computer_short_name
state set to reloading");
- insertloadlog($reservation_id, $computer_id, "info",
"computer state updated to reloading");
- }
- else {
- notify($ERRORS{'CRITICAL'}, 0, "unable to set
$computer_short_name into reloading state, returning");
- insertloadlog($reservation_id, $computer_id, "failed",
"unable to set computer $computer_short_name state to reloading");
- return;
- }
-
# Call provisioning module's load() subroutine
notify($ERRORS{'OK'}, 0, "calling " . ref($self->provisioner) .
"->load() subroutine");
insertloadlog($reservation_id, $computer_id, "info", "calling "
. ref($self->provisioner) . "->load() subroutine");