Author: arkurth
Date: Thu Mar 30 21:58:00 2017
New Revision: 1789591

URL: http://svn.apache.org/viewvc?rev=1789591&view=rev
Log:
VCL-867
Added call to is_ssh_responding before calling pre_reload to eliminate a 
useless retry delay if the computer is down.

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=1789591&r1=1789590&r2=1789591&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/new.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/new.pm Thu Mar 30 21:58:00 2017
@@ -567,9 +567,11 @@ sub reload_image {
                
                # OS currently installed on computer may not be the same type 
as $self->os
                # Attempt to create a new OS object representing OS currently 
installed and check if that object implements a 'pre_reload' subroutine
-               my $computer_current_os = 
$self->create_current_os_object($computer_id, 1);
-               if ($computer_current_os && 
$computer_current_os->can('pre_reload')) {
-                       $computer_current_os->pre_reload();
+               if ($self->os->is_ssh_responding()) {
+                       my $computer_current_os = 
$self->create_current_os_object($computer_id, 1);
+                       if ($computer_current_os && 
$computer_current_os->can('pre_reload')) {
+                               $computer_current_os->pre_reload();
+                       }
                }
                
                # Update the computer state to reloading


Reply via email to