You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2014/06/19 21:13:04 UTC
svn commit: r1604013 - /vcl/trunk/managementnode/lib/VCL/new.pm
Author: fapeeler
Date: Thu Jun 19 19:13:04 2014
New Revision: 1604013
URL: http://svn.apache.org/r1604013
Log:
VCL-50
fixed issue related to moving a blade directly from maintenance to vmhostinuse
Modified:
vcl/trunk/managementnode/lib/VCL/new.pm
Modified: vcl/trunk/managementnode/lib/VCL/new.pm
URL: http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/new.pm?rev=1604013&r1=1604012&r2=1604013&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/new.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/new.pm Thu Jun 19 19:13:04 2014
@@ -713,12 +713,19 @@ sub computer_not_being_used {
notify($ERRORS{'OK'}, 0, "attempt $attempt/$attempt_limit: checking for competing reservations assigned to $computer_short_name");
my $computer_state_name = $self->data->get_computer_state_name();
- # Return 0 if computer state is maintenance, deleted, vmhostinuse
- if ($computer_state_name =~ /^(deleted|maintenance|vmhostinuse)$/) {
+ # Return 0 if computer state is deleted, vmhostinuse
+ if ($computer_state_name =~ /^(deleted|vmhostinuse)$/) {
notify($ERRORS{'WARNING'}, 0, "$computer_short_name is NOT available, its state is $computer_state_name");
return 0;
}
-
+
+ # Return 0 if computer state is maintenance and request state name is not vmhostinuse
+ # Allow computers to go from maintenance directly to a vmhost
+ if ($computer_state_name =~ /^(maintenance)$/ && $request_state_name !~ /tovmhostinuse/) {
+ notify($ERRORS{'WARNING'}, 0, "$computer_short_name is NOT available, its state is $computer_state_name");
+ return 0;
+ }
+
# Warn if computer state isn't available or reload - except for reinstall requests
if ($request_state_name !~ /^(reinstall)$/ && $computer_state_name !~ /^(available|reload)$/) {
notify($ERRORS{'WARNING'}, 0, "$computer_short_name state is $computer_state_name, checking if any conflicting reservations are active");