You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2013/08/29 22:34:26 UTC

svn commit: r1518814 - in /vcl/trunk/managementnode/lib/VCL: Module/Provisioning/xCAT.pm image.pm

Author: arkurth
Date: Thu Aug 29 20:34:25 2013
New Revision: 1518814

URL: http://svn.apache.org/r1518814
Log:
VCL-711
Moved call to check_image_os to beginning of image.pm::process. Realized it needs to be set before currentimage.txt is written.

Modified:
    vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm
    vcl/trunk/managementnode/lib/VCL/image.pm

Modified: vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm?rev=1518814&r1=1518813&r2=1518814&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT.pm Thu Aug 29 20:34:25 2013
@@ -420,11 +420,6 @@ sub capture {
 		return;
 	}
 	
-	# Check if image OS needs to be updated
-	if (!$self->_check_image_os()) {
-		return;
-	}
-	
 	my $image_name          = $self->data->get_image_name();
 	my $computer_node_name  = $self->data->get_computer_node_name();
 	
@@ -439,7 +434,7 @@ sub capture {
 	
 	# Print some preliminary information
 	notify($ERRORS{'OK'}, 0, "attempting to capture image '$image_name' on $computer_node_name");
-
+	
 	# Make sure the computer is powered on
 	my $power_status = $self->power_status();
 	if (!$power_status || $power_status !~ /on/i) {
@@ -2309,7 +2304,7 @@ sub _get_install_status {
 
 #/////////////////////////////////////////////////////////////////////////////
 
-=head2 _check_image_os
+=head2 check_image_os
 
  Parameters  : none
  Returns     : boolean
@@ -2320,7 +2315,7 @@ sub _get_install_status {
 
 =cut
 
-sub _check_image_os {
+sub check_image_os {
 	my $self = shift;
 	if (ref($self) !~ /xCAT/i) {
 		notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a function, it must be called as a class method");

Modified: vcl/trunk/managementnode/lib/VCL/image.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/image.pm?rev=1518814&r1=1518813&r2=1518814&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/image.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/image.pm Thu Aug 29 20:34:25 2013
@@ -87,7 +87,16 @@ use VCL::utils;
 =cut
 
 sub process {
-	my $self                       = shift;
+	my $self = shift;
+	
+	# Check if image OS needs to be updated
+	# Do this before retrieving data because it may change
+	if ($self->provisioner->can('check_image_os')) {
+		if (!$self->provisioner->check_image_os()) {
+			return;
+		}
+	}
+	
 	my $request_id                 = $self->data->get_request_id();
 	my $reservation_id             = $self->data->get_reservation_id();
 	my $user_id                    = $self->data->get_user_id();