Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9EC511939 for ; Mon, 11 Aug 2014 14:47:12 +0000 (UTC) Received: (qmail 36657 invoked by uid 500); 11 Aug 2014 14:47:12 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 36628 invoked by uid 500); 11 Aug 2014 14:47:12 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 36618 invoked by uid 500); 11 Aug 2014 14:47:12 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 36615 invoked by uid 99); 11 Aug 2014 14:47:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2014 14:47:12 +0000 Date: Mon, 11 Aug 2014 14:47:12 +0000 (UTC) From: "David Bierce (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-6254) Template disappears when download cleanedup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)