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 2011/08/23 18:28:36 UTC
svn commit: r1160777 -
/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
Author: arkurth
Date: Tue Aug 23 16:28:36 2011
New Revision: 1160777
URL: http://svn.apache.org/viewvc?rev=1160777&view=rev
Log:
VCL-504
Updated State.pm::initialize to call update_reservation_lastcheck. This will prevent multiple critical notifications from being sent if an inuse reservation process fails to initialize completely. Rather from attempting to process the reservation over and over again without a delay, vcld will only attempt to process it every 5 minutes.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm?rev=1160777&r1=1160776&r2=1160777&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm Tue Aug 23 16:28:36 2011
@@ -79,6 +79,8 @@ sub initialize {
$self->{start_time} = time;
+ my $reservation_id = $self->data->get_reservation_id();
+
# Initialize the database handle count
$ENV{dbh_count} = 0;
@@ -88,12 +90,16 @@ sub initialize {
}
else {
notify($ERRORS{'WARNING'}, 0, "unable to obtain a database handle for this state process");
+ return;
}
+ # Update reservation lastcheck value to prevent processes from being forked over and over if a problem occurs
+ update_reservation_lastcheck($reservation_id);
+
# Check the image OS before creating OS object
if (!$self->check_image_os()) {
notify($ERRORS{'WARNING'}, 0, "failed to check if image OS is correct");
- $self->reservation_failed();
+ return;
}
# Rename this process to include some request info
@@ -125,7 +131,6 @@ sub initialize {
notify($ERRORS{'DEBUG'}, 0, "returning 1");
return 1;
-
} ## end sub initialize
#/////////////////////////////////////////////////////////////////////////////