mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix CLOUDSTACK-2485: ClassCastException in extracting ISO.
This commit is contained in:
parent
95e7e270d4
commit
252f384e89
@ -34,4 +34,5 @@ public interface ImageStoreEntity extends DataStore, ImageStore {
|
|||||||
SnapshotInfo getSnapshot(long snapshotId);
|
SnapshotInfo getSnapshot(long snapshotId);
|
||||||
boolean exists(DataObject object);
|
boolean exists(DataObject object);
|
||||||
Set<TemplateInfo> listTemplates();
|
Set<TemplateInfo> listTemplates();
|
||||||
|
String getMountPoint(); // get the mount point on ssvm.
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,8 +177,9 @@ public class ImageStoreImpl implements ImageStoreEntity {
|
|||||||
return getDriver().getStoreTO(this);
|
return getDriver().getStoreTO(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageStoreVO getImageStoreVO(){
|
@Override
|
||||||
return this.imageDataStoreVO;
|
public String getMountPoint(){
|
||||||
|
return this.imageDataStoreVO.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
|
|||||||
import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
|
import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
|
||||||
import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
|
import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
|
||||||
import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
|
import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
|
||||||
|
import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -229,7 +230,7 @@ public class UploadMonitorImpl extends ManagerBase implements UploadMonitor {
|
|||||||
// Create Symlink at ssvm
|
// Create Symlink at ssvm
|
||||||
String path = vmTemplateHost.getInstallPath();
|
String path = vmTemplateHost.getInstallPath();
|
||||||
String uuid = UUID.randomUUID().toString() + "." + template.getFormat().getFileExtension(); // adding "." + vhd/ova... etc.
|
String uuid = UUID.randomUUID().toString() + "." + template.getFormat().getFileExtension(); // adding "." + vhd/ova... etc.
|
||||||
CreateEntityDownloadURLCommand cmd = new CreateEntityDownloadURLCommand(((ImageStoreVO)store).getParent(), path, uuid);
|
CreateEntityDownloadURLCommand cmd = new CreateEntityDownloadURLCommand(((ImageStoreEntity)store).getMountPoint(), path, uuid);
|
||||||
Answer ans = ep.sendMessage(cmd);
|
Answer ans = ep.sendMessage(cmd);
|
||||||
if (ans == null || !ans.getResult()) {
|
if (ans == null || !ans.getResult()) {
|
||||||
errorString = "Unable to create a link for " +type+ " id:"+template.getId() + "," + ans.getDetails();
|
errorString = "Unable to create a link for " +type+ " id:"+template.getId() + "," + ans.getDetails();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user