Author: fapeeler
Date: Fri Jun 26 19:18:01 2015
New Revision: 1687841
URL: http://svn.apache.org/r1687841
Log:
VCL-877
updated libvirt.pm to also check for checkpoint state
updated image.pm to set laststatid to use request_state_name variable
Modified:
vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
vcl/trunk/managementnode/lib/VCL/image.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm?rev=1687841&r1=1687840&r2=1687841&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm Fri Jun 26
19:18:01 2015
@@ -930,7 +930,7 @@ sub get_domain_name {
# If request state is image the domain name will be that of the image
used as the base image, not the image being created
# Must find existing loaded domain on node in order to determine name
- if ($request_state_name eq 'image') {
+ if ($request_state_name =~ /image|checkpoint/) {
if (my $active_domain_name = $self->get_active_domain_name()) {
notify($ERRORS{'DEBUG'}, 0, "retrieved name of domain
being captured: '$active_domain_name'");
$self->{domain_name} = $active_domain_name;
Modified: vcl/trunk/managementnode/lib/VCL/image.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/image.pm?rev=1687841&r1=1687840&r2=1687841&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/image.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/image.pm Fri Jun 26 19:18:01 2015
@@ -385,6 +385,7 @@ sub reservation_failed {
my $request_id = $self->data->get_request_id();
my $reservation_id = $self->data->get_reservation_id();
+ my $request_state_name = $self->data->get_request_state_name();
my $user_id = $self->data->get_user_id();
my $user_unityid = $self->data->get_user_login_id();
my $user_email = $self->data->get_user_email();
@@ -493,8 +494,8 @@ END
}
# Update the request state to maintenance, laststate to image
- if (update_request_state($request_id, "maintenance", "image")) {
- notify($ERRORS{'OK'}, 0, "request state set to maintenance,
laststate to image");
+ if (update_request_state($request_id, "maintenance",
$request_state_name)) {
+ notify($ERRORS{'OK'}, 0, "request state set to maintenance,
laststate to $request_state_name");
}
else {
notify($ERRORS{'CRITICAL'}, 0, "unable to set request state to
maintenance, laststate to image");