From efa861cd5c77db906ca2df2f7a25875fc609a516 Mon Sep 17 00:00:00 2001 From: Nitin Mehta Date: Wed, 14 Aug 2013 18:41:45 +0530 Subject: [PATCH] CLOUDSTACK-4287 Builtin template Ready Status is No even after the Status is downlaod complete. The reason was that template sync updates only the template download state but not the state. Fixing that. Ideally we should change the state through state machine only. Signed off by : nitin mehta --- .../org/apache/cloudstack/storage/image/TemplateServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java index 0a7f31c0fbf..578ba69847f 100644 --- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java @@ -318,6 +318,7 @@ public class TemplateServiceImpl implements TemplateService { } else { tmpltStore.setDownloadPercent(100); tmpltStore.setDownloadState(Status.DOWNLOADED); + tmpltStore.setState(ObjectInDataStoreStateMachine.State.Ready); tmpltStore.setInstallPath(tmpltInfo.getInstallPath()); tmpltStore.setSize(tmpltInfo.getSize()); tmpltStore.setPhysicalSize(tmpltInfo.getPhysicalSize());