Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1913#discussion_r101452884
  
    --- Diff: 
plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
 ---
    @@ -1577,11 +1577,15 @@ public Answer createVolume(CreateObjectCommand cmd) 
{
                     }
     
                     synchronized (this) {
    -                    // s_logger.info("Delete file if exists in datastore 
to clear the way for creating the volume. file: " + volumeDatastorePath);
    -                    VmwareStorageLayoutHelper.deleteVolumeVmdkFiles(dsMo, 
volumeUuid.toString(), dcMo);
    -
    -                    vmMo.createDisk(volumeDatastorePath, 
(int)(volume.getSize() / (1024L * 1024L)), morDatastore, 
vmMo.getScsiDeviceControllerKey());
    -                    vmMo.detachDisk(volumeDatastorePath, false);
    +                    try {
    +                        vmMo.createDisk(volumeDatastorePath, 
(int)(volume.getSize() / (1024L * 1024L)), morDatastore, 
vmMo.getScsiDeviceControllerKey());
    +                        vmMo.detachDisk(volumeDatastorePath, false);
    +                    }
    +                    catch (Exception e) {
    +                        s_logger.error("Deleting file " + 
volumeDatastorePath + " due to error: " + e.getMessage());
    +                        
VmwareStorageLayoutHelper.deleteVolumeVmdkFiles(dsMo, volumeUuid.toString(), 
dcMo);
    --- End diff --
    
    This Looks good. Thanks for the update @nvazquez 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to