CLOUDSTACK-5541: Template Creation from snapshot failed with S3 store.

This commit is contained in:
Min Chen 2013-12-18 15:41:37 -08:00
parent 231e7c01f2
commit bb91b739a8

View File

@ -497,12 +497,10 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
answer = ep.sendMessage(cmd); answer = ep.sendMessage(cmd);
} }
} }
// clean up cache entry in case of failure // clean up cache entry
if (answer == null || !answer.getResult()) {
if (cacheData != null) { if (cacheData != null) {
cacheMgr.deleteCacheObject(cacheData); cacheMgr.deleteCacheObject(cacheData);
} }
}
return answer; return answer;
} catch (Exception e) { } catch (Exception e) {
s_logger.debug("copy snasphot failed: " + e.toString()); s_logger.debug("copy snasphot failed: " + e.toString());