Author: arkurth
Date: Thu May 10 20:12:32 2012
New Revision: 1336872

URL: http://svn.apache.org/viewvc?rev=1336872&view=rev
Log:
VCL-503
Updated OS.pm::execute_new. Added '-o ConnectTimeout=30' argument. Also added 
code to add the identity path arguments.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm?rev=1336872&r1=1336871&r2=1336872&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm Thu May 10 20:12:32 
2012
@@ -1922,10 +1922,16 @@ sub execute_new {
        $port = 22 unless $port;
        $user = 'root' unless $user;
        
-       my $ssh_options = '-o StrictHostKeyChecking=no';
+       my $ssh_options = '-o StrictHostKeyChecking=no -o ConnectTimeout=30';
        if ($identity_key) {
                $ssh_options .= " -i $identity_key";
        }
+       else {
+               my @identity_key_paths = 
VCL::DataStructure::get_management_node_identity_key_paths();
+               for my $identity_key_path (@identity_key_paths) {
+                       $ssh_options .= " -i $identity_key_path";
+               }
+       }
        
        # Override the die handler
        local $SIG{__DIE__} = sub{};
@@ -1965,7 +1971,7 @@ sub execute_new {
                                );
                                
                                if ($ssh) {
-                                       notify($ERRORS{'DEBUG'}, 0, "created " 
. ref($ssh) . " object to control $computer_name");
+                                       notify($ERRORS{'DEBUG'}, 0, "created " 
. ref($ssh) . " object to control $computer_name, options: $ssh_options");
                                }
                                else {
                                        notify($ERRORS{'WARNING'}, 0, "failed 
to create Net::SSH::Expect object to control $computer_name, $!");


Reply via email to