cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bierce" <>
Subject Re: Review Request 24779: [CLOUDSTACK-6254] Template disappears when download cleanup
Date Wed, 27 Aug 2014 15:46:58 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 27, 2014, 3:46 p.m.)

Review request for cloudstack.


Fixes the cleanup process to only remove the Template symlink, instead of delete the template
from Secondary Storage.  Changed to use the method Nintin suggested.  This patch it tested
on 4.2 using the same method as previously described.  Will be testing on 4.3 today.


Repository: cloudstack-git


PATCH] This is a quick stab at fixing a dataloss bug.  The ultimate
 solution is to refactor UploadManager to not use any deprecated code. It
 appears there is still code left over that uses the UploadVO/Dao which no
 long contains data about URL transfers.  This method was hardcoded to always
 pass Upload.Type.VOLUME as part of cleanup which was causing templates to be
 removed entirely from secondary storage not just the symlink on secondary

Rather than try to refactor all of it out, this puts
logic for determining if the cleanup task is for a volume or a template
by doing a lookup on the URL.  It is a duplication of the same logic
from the calling method but is a very minimal code change until the
large problem is fixed.

Diffs (updated)

  engine/api/src/org/apache/cloudstack/storage/image/datastore/ 7ebfd0d

  engine/storage/image/src/org/apache/cloudstack/storage/image/store/ 7bbe324

  engine/storage/src/org/apache/cloudstack/storage/image/ 2905f08

  engine/storage/src/org/apache/cloudstack/storage/image/ 444a6c7 
  server/src/com/cloud/storage/ 2a79b0c 



On Cloudstack 4.2 4.3
Set cleanupurl to 30 seconds.  Downloaded a template, cleanup remvoed it from database, didn't
remove the template.
Downloaded Volume, volume was cleaned up from secondary stoage and database.


David Bierce

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message