From e56d2a401c40b4208d062c0a0ce1ec01df73dd08 Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Thu, 2 May 2013 13:45:39 +0530 Subject: [PATCH] CLOUDSTACK-2188 : Parsing error with Download Monitor while checking the health of downloaded templates Signed-off-by: Sateesh Chodapuneedi --- .../src/com/cloud/storage/download/DownloadMonitorImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java index 5d7a2106e6a..220cbffd5a3 100755 --- a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java +++ b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java @@ -875,7 +875,9 @@ public class DownloadMonitorImpl extends ManagerBase implements DownloadMonitor tmpltHost.setPhysicalSize(tmpltInfo.getPhysicalSize()); tmpltHost.setLastUpdated(new Date()); - if (tmpltInfo.getSize() > 0) { + // Skipping limit checks for SYSTEM Account and for the templates created from volumes or snapshots + // which already got checked and incremented during createTemplate API call. + if (tmpltInfo.getSize() > 0 && tmplt.getAccountId() != Account.ACCOUNT_ID_SYSTEM && tmplt.getUrl() != null) { long accountId = tmplt.getAccountId(); try { _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(accountId),