mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-4628:[Automation] Failed to create template from snapshot
with same name; after deleting the first one.
This commit is contained in:
parent
771b8377fd
commit
16a1f150eb
@ -432,7 +432,9 @@ public class
|
||||
int _createprivatetemplatefromsnapshotwait = NumbersUtil.parseInt(value,
|
||||
Integer.parseInt(Config.CreatePrivateTemplateFromSnapshotWait.getDefaultValue()));
|
||||
|
||||
boolean needCache = false;
|
||||
if (needCacheStorage(srcData, destData)) {
|
||||
needCache = true;
|
||||
SnapshotInfo snapshot = (SnapshotInfo) srcData;
|
||||
srcData = cacheSnapshotChain(snapshot);
|
||||
}
|
||||
@ -442,7 +444,7 @@ public class
|
||||
Answer answer = ep.sendMessage(cmd);
|
||||
|
||||
// clean up snapshot copied to staging
|
||||
if (srcData != null) {
|
||||
if (needCache && srcData != null) {
|
||||
cacheMgr.deleteCacheObject(srcData);
|
||||
}
|
||||
return answer;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user