Skip to content

Commit f3b5a6e

Browse files
committed
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.
1 parent a39bf18 commit f3b5a6e

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import com.cloud.agent.api.CreateVolumeFromSnapshotCommand;
4949
import com.cloud.agent.api.UnregisterNicCommand;
5050
import com.cloud.agent.api.storage.CopyVolumeCommand;
51-
import com.cloud.agent.api.storage.CreateEntityDownloadURLCommand;
5251
import com.cloud.agent.api.storage.CreateVolumeOVACommand;
5352
import com.cloud.agent.api.storage.PrepareOVAPackingCommand;
5453
import com.cloud.agent.api.to.DataObjectType;
@@ -394,20 +393,8 @@ public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command cmd) {
394393
} else {
395394
needDelegation = true;
396395
}
397-
} else if (cmd instanceof CreateEntityDownloadURLCommand) {
398-
DataTO srcData = ((CreateEntityDownloadURLCommand)cmd).getData();
399-
if ((HypervisorType.VMware == srcData.getHypervisorType())) {
400-
needDelegation = true;
401-
}
402-
if (srcData.getObjectType() == DataObjectType.VOLUME) {
403-
VolumeObjectTO volumeObjectTO = (VolumeObjectTO)srcData;
404-
if (Storage.ImageFormat.OVA == volumeObjectTO.getFormat()) {
405-
needDelegation = true;
406-
}
407-
}
408396
}
409-
410-
if (!needDelegation) {
397+
if(!needDelegation) {
411398
return new Pair<Boolean, Long>(Boolean.FALSE, new Long(hostId));
412399
}
413400
HostVO host = _hostDao.findById(hostId);

0 commit comments

Comments
 (0)