Author: fapeeler
Date: Thu Jun 11 17:31:17 2009
New Revision: 783853

URL: http://svn.apache.org/viewvc?rev=783853&view=rev
Log:
VCL-156

new.pm:
added check on kickstart installs to run write_currentimage

xcat,xcat21 - removed checks on imagename in node_status


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm
    incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm
    incubator/vcl/trunk/managementnode/lib/VCL/new.pm

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=783853&r1=783852&r2=783853&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm Thu 
Jun 11 17:31:17 2009
@@ -2590,18 +2590,13 @@
 
                # Check the currentimage.txt file on the node
                notify($ERRORS{'DEBUG'}, $log, "checking image specified in 
currentimage.txt file on $computer_short_name");
-               if ($status{nodetype} =~ /win|image/) {
-                       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 ($status{nodetype} =~ /win|image/)
+               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{'OK'}, $log, "currentimage.txt can not 
be checked for image type: $status{nodetype}");
+                       notify($ERRORS{'WARNING'}, $log, "$computer_short_name 
currentimage.txt could not be checked");
                }
        } ## end if ($sshd_status =~ /on/)
        else {

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=783853&r1=783852&r2=783853&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT21.pm 
Thu Jun 11 17:31:17 2009
@@ -2276,18 +2276,13 @@
 
                # Check the currentimage.txt file on the node
                notify($ERRORS{'DEBUG'}, $log, "checking image specified in 
currentimage.txt file on $computer_short_name");
-               if ($status{nodetype} =~ /win|image/) {
-                       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 ($status{nodetype} =~ /win|image/)
+               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{'OK'}, $log, "currentimage.txt can not 
be checked for image type: $status{nodetype}");
+                       notify($ERRORS{'WARNING'}, $log, "$computer_short_name 
currentimage.txt could not be checked");
                }
        } ## end if ($sshd_status =~ /on/)
        else {

Modified: incubator/vcl/trunk/managementnode/lib/VCL/new.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/new.pm?rev=783853&r1=783852&r2=783853&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/new.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/new.pm Thu Jun 11 17:31:17 2009
@@ -487,6 +487,7 @@
        my $image_project                   = $self->data->get_image_project();
        my $image_reloadtime                = 
$self->data->get_image_reload_time();
        my $image_architecture              = 
$self->data->get_image_architecture();
+       my $image_os_install_type                               = 
$self->data->get_image_os_install_type();
        my $image_os_type                   = $self->data->get_image_os_type();
        my $imagemeta_checkuser             = 
$self->data->get_imagemeta_checkuser();
        my $imagemeta_usergroupid           = 
$self->data->get_imagemeta_usergroupid();
@@ -702,6 +703,14 @@
                notify($ERRORS{'OK'}, 0, ref($self->os) . "->post_load() 
subroutine does not exist");
        }
 
+       #Post operations not to be handled by provisioning modules
+       if($image_os_install_type eq "kickstart"){
+               notify($ERRORS{'OK'}, 0, "Detected kickstart install on 
$computer_short_name, writing current_image.txt");
+                 if(write_currentimage_txt($self->data)){
+                         notify($ERRORS{'OK'}, 0, "Successfully wrote 
current_image.txt on $computer_short_name");
+                 }
+       }
+
        notify($ERRORS{'OK'}, 0, "node ready: successfully reloaded 
$computer_short_name with $image_name");
        insertloadlog($reservation_id, $computer_id, "nodeready", 
"$computer_short_name was reloaded with $image_name");
 


Reply via email to