Author: fapeeler Date: Thu May 31 16:47:15 2012 New Revision: 1344810 URL: http://svn.apache.org/viewvc?rev=1344810&view=rev Log: VCL-576
- Updated OS.pm based on Aaron Coburn's fix to reduce hugh amounts of output data to log file. - added display_output flag to a few other execute calls to be consistent. - xCAT modules, converted variable passed to ping routine to shortname. In many cases this would not resolve. Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.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=1344810&r1=1344809&r2=1344810&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm Thu May 31 16:47:15 2012 @@ -263,7 +263,7 @@ sub get_currentimage_txt_contents { # Attempt to retrieve the contents of currentimage.txt my $cat_command = "cat ~/currentimage.txt"; - my ($cat_exit_status, $cat_output) = $self->execute($cat_command); + my ($cat_exit_status, $cat_output) = $self->execute($cat_command,1); if (!defined($cat_output)) { notify($ERRORS{'WARNING'}, 0, "failed to execute command to failed to retrieve currentimage.txt from $computer_node_name"); return; @@ -1739,7 +1739,7 @@ sub create_text_file { $command .= " > $file_path"; } - my ($exit_status, $output) = $self->execute($command); + my ($exit_status, $output) = $self->execute($command,1); if (!defined($output)) { notify($ERRORS{'WARNING'}, 0, "failed to execute ssh command to create file on $computer_node_name: $file_path"); return; @@ -1785,7 +1785,7 @@ sub get_file_contents { # Run cat to retrieve the contents of the file my $command = "cat \"$path\""; - my ($exit_status, $output) = $self->execute($command); + my ($exit_status, $output) = $self->execute($command,0); if (!defined($output)) { notify($ERRORS{'WARNING'}, 0, "failed to run command to read file on $computer_short_name:\n path: '$path'\ncommand: '$command'"); return; @@ -2179,7 +2179,7 @@ sub get_os_type { my $computer_node_name = $self->data->get_computer_node_name() || return; my $command = 'uname -a'; - my ($exit_status, $output) = $self->execute($command); + my ($exit_status, $output) = $self->execute($command,0); if (!defined($output)) { notify($ERRORS{'WARNING'}, 0, "failed to run command to determine OS type currently installed on $computer_node_name"); return; @@ -2663,7 +2663,7 @@ sub copy_file { # Execute the command to copy the file my $command = "cp -fr $escaped_source_path $escaped_destination_path"; notify($ERRORS{'DEBUG'}, 0, "attempting to copy file on $computer_node_name: '$source_file_path' -> '$destination_file_path'"); - my ($exit_status, $output) = $self->execute($command); + my ($exit_status, $output) = $self->execute($command,0); if (!defined($output)) { notify($ERRORS{'WARNING'}, 0, "failed to run command to copy file on $computer_node_name:\nsource path: '$source_file_path'\ndestination path: '$destination_file_path'\ncommand: '$command'"); return; @@ -2861,7 +2861,7 @@ sub get_file_checksum { $file_path =~ s/([\$])/\\$1/g; my $command = "cksum \"$file_path\""; - my ($exit_status, $output) = $self->execute($command); + my ($exit_status, $output) = $self->execute($command,1); if (!defined($output)) { notify($ERRORS{'WARNING'}, 0, "failed to execute command to determine checksum of file: $file_path"); return; Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm?rev=1344810&r1=1344809&r2=1344810&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm Thu May 31 16:47:15 2012 @@ -2173,14 +2173,14 @@ sub node_status { } # Check if node is pingable - notify($ERRORS{'DEBUG'}, $log, "checking if $computer_host_name is pingable"); - if (_pingnode($computer_host_name)) { + notify($ERRORS{'DEBUG'}, $log, "checking if $computer_short_name is pingable"); + if (_pingnode($computer_short_name)) { $status{ping} = 1; - notify($ERRORS{'OK'}, $log, "$computer_host_name is pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is pingable ($status{ping})"); } else { $status{ping} = 0; - notify($ERRORS{'OK'}, $log, "$computer_host_name is not pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is not pingable ($status{ping})"); } # Check the rpower status Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm?rev=1344810&r1=1344809&r2=1344810&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm Thu May 31 16:47:15 2012 @@ -1812,14 +1812,14 @@ sub node_status { } # Check if node is pingable - notify($ERRORS{'OK'}, $log, "checking if $computer_host_name is pingable"); - if (_pingnode($computer_host_name)) { + notify($ERRORS{'OK'}, $log, "checking if $computer_short_name is pingable"); + if (_pingnode($computer_short_name)) { $status{ping} = 1; - notify($ERRORS{'OK'}, $log, "$computer_host_name is pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is pingable ($status{ping})"); } else { $status{ping} = 0; - notify($ERRORS{'OK'}, $log, "$computer_host_name is not pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is not pingable ($status{ping})"); } # Check the rpower status Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm?rev=1344810&r1=1344809&r2=1344810&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm Thu May 31 16:47:15 2012 @@ -1819,14 +1819,14 @@ sub node_status { } # Check if node is pingable - notify($ERRORS{'DEBUG'}, $log, "checking if $computer_host_name is pingable"); - if (_pingnode($computer_host_name)) { + notify($ERRORS{'DEBUG'}, $log, "checking if $computer_short_name is pingable"); + if (_pingnode($computer_short_name)) { $status{ping} = 1; - notify($ERRORS{'OK'}, $log, "$computer_host_name is pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is pingable ($status{ping})"); } else { $status{ping} = 0; - notify($ERRORS{'OK'}, $log, "$computer_host_name is not pingable ($status{ping})"); + notify($ERRORS{'OK'}, $log, "$computer_short_name is not pingable ($status{ping})"); } # Check the rpower status