From bb91b739a8908ba7fa8ebc8db79be79ec82a800a Mon Sep 17 00:00:00 2001 From: Min Chen Date: Wed, 18 Dec 2013 15:41:37 -0800 Subject: [PATCH] CLOUDSTACK-5541: Template Creation from snapshot failed with S3 store. --- .../storage/motion/AncientDataMotionStrategy.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java index 5c1ff40d32e..48c39cd5280 100644 --- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java +++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -497,11 +497,9 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { answer = ep.sendMessage(cmd); } } - // clean up cache entry in case of failure - if (answer == null || !answer.getResult()) { - if (cacheData != null) { - cacheMgr.deleteCacheObject(cacheData); - } + // clean up cache entry + if (cacheData != null) { + cacheMgr.deleteCacheObject(cacheData); } return answer; } catch (Exception e) {