PaulAngus opened a new issue #3340: ACS tries to delete a root disk in zone 
wide primary storage
URL: https://github.com/apache/cloudstack/issues/3340
 
 
   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and master branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   vSphere - Zone wide storage
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master 
branch.
   -->
   
   ~~~
   4.9, 4.11, 4.12, master
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   
   vSphere with zone-wide storage
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   N/A
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   Transferred from Jira :
   https://issues.apache.org/jira/browse/CLOUDSTACK-9991
   
   A VM is running and the disk is migrated from cluster to zone wide primary 
storage. The root disk for that VM is now seen in all clusters and ACS tries to 
delete it. This fails, fortunately but only because it is in use. ACS should 
not try to delete the disk.
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   
   
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Migrate the root disk of a running VM from cluster-wide to zone wide storage.
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   message seen:
   Cannot delete file [Perf06_ix_stor_003] i-93-8549-VM/ROOT-8549-delta.vmdk
   
   It looks like this message
   private void deleteUnregisteredVmFiles(VirtualMachineFileLayoutEx 
vmFileLayout, DatacenterMO dcMo, boolean deleteDisks) throws Exception { 
s_logger.debug("Deleting files associated with an existing VM that was 
unregistered");
   
   from here: 
https://github.com/apache/cloudstack/blob/a25b54cf05704bcf074e67d5500d5d221235cc86/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java#L2712-L2713
   
   because the start is reading this: 
https://github.com/apache/cloudstack/blob/a25b54cf05704bcf074e67d5500d5d221235cc86/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java#L2073-L2076
   
   // Since VM was successfully powered-on, if there was an existing VM in a 
different cluster that was unregistered, delete all the files associated with 
it.
   if (existingVmName != null && existingVmFileLayout != null)
   
   { deleteUnregisteredVmFiles(existingVmFileLayout, dcMo, true); }
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   
   ~~~
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to