Updated Branches: refs/heads/master b0e06981c -> efa861cd5
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<[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/efa861cd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/efa861cd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/efa861cd Branch: refs/heads/master Commit: efa861cd5c77db906ca2df2f7a25875fc609a516 Parents: b0e0698 Author: Nitin Mehta <[email protected]> Authored: Wed Aug 14 18:41:45 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Wed Aug 14 18:43:47 2013 +0530 ---------------------------------------------------------------------- .../org/apache/cloudstack/storage/image/TemplateServiceImpl.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/efa861cd/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java ---------------------------------------------------------------------- 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 0a7f31c..578ba69 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());
