Updated Branches: refs/heads/4.2 507f74221 -> e40043fc3
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/e40043fc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e40043fc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e40043fc Branch: refs/heads/4.2 Commit: e40043fc3d7ea75b55954b443b3306f39e39d027 Parents: 507f742 Author: Nitin Mehta <[email protected]> Authored: Wed Aug 14 18:41:45 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Wed Aug 14 18:41:45 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/e40043fc/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 9eef399..4711f50 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 @@ -317,6 +317,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());
