CLOUDSTACK-2188 : Parsing error with Download Monitor while checking the health of downloaded templates

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sanjay Tripathi 2013-05-02 13:45:39 +05:30 committed by Sateesh Chodapuneedi
parent 72067612e6
commit e56d2a401c

View File

@ -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),