Author: arkurth
Date: Thu Aug 20 19:51:07 2009
New Revision: 806327

URL: http://svn.apache.org/viewvc?rev=806327&view=rev
Log:
VCL-165
Added check in vmware.pm where it is listing the contents of the VM host's data 
store. If the command fails, the array returned was undefined and this error 
occurred:

Can't use an undefined value as an ARRAY reference at
 /usr/local/vcl/bin/../lib/VCL/Module/Provisioning/vmware.pm line 263.

This caused the process to die immediately and the process was left in the 
pending state.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm

Modified: 
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm?rev=806327&r1=806326&r2=806327&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
Thu Aug 20 19:51:07 2009
@@ -260,7 +260,14 @@
                        notify($ERRORS{'OK'}, 0, "listing datestore 
$datastorepath ");
                        undef @sshcmd;
                        @sshcmd = run_ssh_command($hostnode, $identity, "ls -1 
$datastorepath", "root");
-                       notify($ERRORS{'OK'}, 0, "@{ $sshcmd[1] }");
+                       if (!defined(@{$sshcmd[1]})) {
+                               notify($ERRORS{'CRITICAL'}, 0, "failed to list 
data store contents $datastorepath on vm host");
+                               insertloadlog($reservation_id, 
$vmclient_computerid, "failed", "failed to list data store contents 
$datastorepath on vm host");
+                               close(TMPLOCK);
+                               unlink($tmplockfile);
+                               return 0;
+                       }
+                       notify($ERRORS{'OK'}, 0, "data store contents 
$datastorepath on vm host:\...@{ $sshcmd[1] }");
                        foreach my $l (@{$sshcmd[1]}) {
                                if ($l =~ /denied|No such/) {
                                        notify($ERRORS{'CRITICAL'}, 0, "node 
$hostnode output @{ $sshcmd[1] }");


Reply via email to