Revert "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."

This reverts commit f3b5a6ebc70d5bfb2c77b6aa359d7eb79b4507e5.
Reverting since a better fix is available with CLOUDSTACK-6478
This commit is contained in:
Nitin Mehta 2014-10-06 15:00:32 -07:00
parent 97768b2657
commit 9e7fbae52f

View File

@ -48,6 +48,7 @@ import com.cloud.agent.api.CreatePrivateTemplateFromVolumeCommand;
import com.cloud.agent.api.CreateVolumeFromSnapshotCommand; import com.cloud.agent.api.CreateVolumeFromSnapshotCommand;
import com.cloud.agent.api.UnregisterNicCommand; import com.cloud.agent.api.UnregisterNicCommand;
import com.cloud.agent.api.storage.CopyVolumeCommand; 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.CreateVolumeOVACommand;
import com.cloud.agent.api.storage.PrepareOVAPackingCommand; import com.cloud.agent.api.storage.PrepareOVAPackingCommand;
import com.cloud.agent.api.to.DataObjectType; import com.cloud.agent.api.to.DataObjectType;
@ -393,8 +394,20 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
} else { } else {
needDelegation = true; 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)); return new Pair<Boolean, Long>(Boolean.FALSE, new Long(hostId));
} }
HostVO host = _hostDao.findById(hostId); HostVO host = _hostDao.findById(hostId);