Author: arkurth
Date: Fri Jun 12 18:57:03 2009
New Revision: 784234
URL: http://svn.apache.org/viewvc?rev=784234&view=rev
Log:
VCL-157
Updated xCAT21.pm's does_image_exist() and get_image_size() subroutines to
check for partimage .gz files.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm
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=784234&r1=784233&r2=784234&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm
Fri Jun 12 18:57:03 2009
@@ -2276,14 +2276,14 @@
# Check the currentimage.txt file on the node
notify($ERRORS{'DEBUG'}, $log, "checking image specified in
currentimage.txt file on $computer_short_name");
- my $status_currentimage =
_getcurrentimage($computer_short_name);
- if ($status_currentimage) {
- notify($ERRORS{'OK'}, $log, "$computer_short_name
currentimage.txt has: $status_currentimage");
- $status{currentimage} = $status_currentimage;
- }
- else {
- notify($ERRORS{'WARNING'}, $log, "$computer_short_name
currentimage.txt could not be checked");
- }
+ my $status_currentimage =
_getcurrentimage($computer_short_name);
+ if ($status_currentimage) {
+ notify($ERRORS{'OK'}, $log,
"$computer_short_name currentimage.txt has: $status_currentimage");
+ $status{currentimage} = $status_currentimage;
+ }
+ else {
+ notify($ERRORS{'WARNING'}, $log,
"$computer_short_name currentimage.txt could not be checked");
+ }
} ## end if ($sshd_status =~ /on/)
else {
$status{ssh} = 0;
@@ -2487,8 +2487,9 @@
}
} ## end if ($image_os_install_type eq 'kickstart')
# Check if image files exist (Partimage files)
- elsif (!-s "$image_repository_path/$image_name.img") {
- notify($ERRORS{'OK'}, 0, "image file
$image_repository_path/$image_name.img does not exist");
+ elsif (!-s "$image_repository_path/$image_name.img" and
+ !-s "$image_repository_path/$image_name.gz") {
+ notify($ERRORS{'OK'}, 0, "image file
$image_repository_path/$image_name.(img|gz) does not exist");
return 0;
}
@@ -2798,7 +2799,7 @@
# Execute the command
# TODO add gzip support
- my $du_command = "du -c $image_repository_path/$image_name*.img 2>&1";
+ my $du_command = "du -c $image_repository_path/$image_name*.img
$image_repository_path/$image_name*.gz* 2>&1";
notify($ERRORS{'DEBUG'}, 0, "du command: $du_command");
my $du_output = `$du_command`;