Repository: cloudstack Updated Branches: refs/heads/master a39bf18bc -> f3b5a6ebc
CLOUDSTACK-7533: Wrong download URL is generated when using multiple SSVMs in a zone. The public ip of the url would sometime point to the wrong ssvm when the url was created on another one. Fix the bug by removing the command CreateEntityDownloadURLCommand from the host delegation. This results in same ssvm for creating the symlink on ssvm and same public ip being used for generating the url on MS. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f3b5a6eb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f3b5a6eb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f3b5a6eb Branch: refs/heads/master Commit: f3b5a6ebc70d5bfb2c77b6aa359d7eb79b4507e5 Parents: a39bf18 Author: Nitin Mehta <[email protected]> Authored: Wed Sep 10 17:46:33 2014 -0700 Committer: Nitin Mehta <[email protected]> Committed: Wed Sep 10 17:46:33 2014 -0700 ---------------------------------------------------------------------- .../src/com/cloud/hypervisor/guru/VMwareGuru.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3b5a6eb/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java index abc7cdb..ef74794 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java @@ -48,7 +48,6 @@ import com.cloud.agent.api.CreatePrivateTemplateFromVolumeCommand; import com.cloud.agent.api.CreateVolumeFromSnapshotCommand; import com.cloud.agent.api.UnregisterNicCommand; import com.cloud.agent.api.storage.CopyVolumeCommand; -import com.cloud.agent.api.storage.CreateEntityDownloadURLCommand; import com.cloud.agent.api.storage.CreateVolumeOVACommand; import com.cloud.agent.api.storage.PrepareOVAPackingCommand; import com.cloud.agent.api.to.DataObjectType; @@ -394,20 +393,8 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co } else { needDelegation = true; } - } else if (cmd instanceof CreateEntityDownloadURLCommand) { - DataTO srcData = ((CreateEntityDownloadURLCommand)cmd).getData(); - if ((HypervisorType.VMware == srcData.getHypervisorType())) { - needDelegation = true; - } - if (srcData.getObjectType() == DataObjectType.VOLUME) { - VolumeObjectTO volumeObjectTO = (VolumeObjectTO)srcData; - if (Storage.ImageFormat.OVA == volumeObjectTO.getFormat()) { - needDelegation = true; - } - } } - - if (!needDelegation) { + if(!needDelegation) { return new Pair<Boolean, Long>(Boolean.FALSE, new Long(hostId)); } HostVO host = _hostDao.findById(hostId);
