[ https://issues.apache.org/jira/browse/CLOUDSTACK-6254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092831#comment-14092831 ]
David Bierce commented on CLOUDSTACK-6254: ------------------------------------------ The method above that is always passing Upload.Type.VOLUME so it will always be deleting. The top of the stack that calls for cleanup calls for clean up volumes and templates separately since they are in separate tables now. I was thinking of adding a new field to to the cleanup executing deleteEntityExtractUrl but that seems kind of hacky. Is there a better way to determine if an image is a template or a volume? @Override public void deleteEntityExtractUrl(DataStore store, String installPath, String downloadUrl) { // find an endpoint to send command EndPoint ep = _epSelector.select(store); // Create Symlink at ssvm //CreateEntityDownloadURLCommand cmd = new CreateEntityDownloadURLCommand(((ImageStoreEntity) store).getMountPoint(), installPath, uuid); DeleteEntityDownloadURLCommand cmd = new DeleteEntityDownloadURLCommand(installPath, Upload.Type.VOLUME, downloadUrl, ((ImageStoreEntity) store).getMountPoint()); Answer ans = ep.sendMessage(cmd); if (ans == null || !ans.getResult()) { String errorString = "Unable to delete the url " + downloadUrl + " for path " + installPath + " on ssvm, " + ans.getDetails(); s_logger.error(errorString); throw new CloudRuntimeException(errorString); } } There is a lot of the code on the secondary storage VM and the cleanup/creation process that references UploadVO. Why is there stuff using something that was deprecated? > Template disappears when download cleanedup > ------------------------------------------- > > Key: CLOUDSTACK-6254 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6254 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Affects Versions: 4.2.1, 4.3.0 > Reporter: Alex Hitchins > Assignee: Alex Hitchins > Attachments: 2014-03-18 16_32_58-gitk_ cloudstack.png > > > In 4.2.1, the template VHD file gets removed from the template directory > after it has been downloaded. This issue occurs when the secondary storage > server is cleaning up the symlink in /var/www/html/. > Along with removing the symlink, the actual vhd is also removed. > It looks like maybe the SSVM is seeing the template as a volume and thinks > that it is removing a hard link. -- This message was sent by Atlassian JIRA (v6.2#6252)