Author: arkurth
Date: Wed Jan 14 09:13:51 2009
New Revision: 734449

URL: http://svn.apache.org/viewvc?rev=734449&view=rev
Log:
VCL-52
Fixed a bug which was causing reservations to fail if the node was not properly 
added to the gkh file.  Added regular expression to utils.pm::run_ssh_command 
which removes the known hosts warning message from the SSH output.  This 
message appears if the host is not listed in /opt/xcat/etc/gkh.  It was causing 
problems in calling subroutines if they expect the output to exactly match a 
certain format.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=734449&r1=734448&r2=734449&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Wed Jan 14 09:13:51 2009
@@ -6781,7 +6781,7 @@
                # Bits 9-16 of $? contain the child process exit status
                $exit_status = $? >> 8;
                
-               notify($ERRORS{'DEBUG'}, 0, "\$?: $?, signal: $signal_number, 
core dump: $core_dump, exit status: $exit_status");
+               #notify($ERRORS{'DEBUG'}, 0, "\$?: $?, signal: $signal_number, 
core dump: $core_dump, exit status: $exit_status");
 
                ## For some reason the SSH exit status is sometimes 
right-padded with 8 0's
                ## Shift right 8 bits to get the real value if it's > 255
@@ -6789,10 +6789,15 @@
                #       $ssh_exit_status = ($ssh_exit_status >> 8);
                #}
 
-               # Strip out the key warning message
+               # Strip out the key warning message from the output
                $ssh_output =~ s/\...@{10,}.*man-in-the-middle attacks\.//igs;
+               
+               # Strip out known hosts warning message
+               #    Warning: Permanently added 'blade1b2-8' (RSA) to the list 
of known hosts.
+               $ssh_output =~ s/Warning: Permanently added .+ to the list of 
known hosts\.//igs;
+               
+               # Remove any spaces from the beginning and end of the output
                $ssh_output =~ s/^\s+|\s+$//g;
-               chomp $ssh_output;
 
                # Set the output string to none if no output was produced
                $ssh_output = 'none' if !$ssh_output;


Reply via email to