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 2016/07/05 15:29:15 UTC
svn commit: r1751499 - /vcl/trunk/managementnode/lib/VCL/image.pm
Author: arkurth
Date: Tue Jul 5 15:29:14 2016
New Revision: 1751499
URL: http://svn.apache.org/viewvc?rev=1751499&view=rev
Log:
Added check to make sure post_load subroutine is implemented in image.pm where post_load is called during checkpoint state.
Modified:
vcl/trunk/managementnode/lib/VCL/image.pm
Modified: vcl/trunk/managementnode/lib/VCL/image.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/image.pm?rev=1751499&r1=1751498&r2=1751499&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/image.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/image.pm Tue Jul 5 15:29:14 2016
@@ -172,9 +172,12 @@ sub process {
$self->reservation_failed();
}
- if (!$self->os->post_load()) {
- notify($ERRORS{'CRITICAL'}, 0, "failed to create checkpoint of image, unable to complete OS post-load tasks on $computer_shortname after image was captured and computer was powered on");
- $self->reservation_failed();
+ # Check if the OS module implements a post_load subroutine
+ if ($self->os->can('post_load')) {
+ if (!$self->os->post_load()) {
+ notify($ERRORS{'CRITICAL'}, 0, "failed to create checkpoint of image, unable to complete OS post-load tasks on $computer_shortname after image was captured and computer was powered on");
+ $self->reservation_failed();
+ }
}
if (!$self->os->reserve()) {