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.
This commit is contained in:
Nitin Mehta 2014-09-10 17:46:33 -07:00
parent a39bf18bc7
commit f3b5a6ebc7
1 changed files with 1 additions and 14 deletions

View File

@ -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);