cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/4.5 to 99cb197
Date Mon, 01 Dec 2014 12:05:29 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 1a67b6e98 -> 99cb19787


CLOUDSTACK-7404: Failed to start an instance when originating template has been deleted

Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
(cherry picked from commit c1bf7eeeeeb3bd4dad384225d411e21859cce470)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99cb1978
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99cb1978
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99cb1978

Branch: refs/heads/4.5
Commit: 99cb19787e55e2a80f2683291abc53fabb13f5c7
Parents: 1a67b6e
Author: Loic Lambiel <lll@exoscale.ch>
Authored: Mon Sep 1 10:31:57 2014 +0200
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Mon Dec 1 13:05:12 2014 +0100

----------------------------------------------------------------------
 .../components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java | 2 +-
 .../orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99cb1978/engine/components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java b/engine/components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java
index a1e2528..4284a21 100644
--- a/engine/components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java
+++ b/engine/components-api/src/com/cloud/vm/VirtualMachineProfileImpl.java
@@ -103,7 +103,7 @@ public class VirtualMachineProfileImpl implements VirtualMachineProfile
{
     @Override
     public VirtualMachineTemplate getTemplate() {
         if (_template == null && _vm != null) {
-            _template = s_entityMgr.findById(VirtualMachineTemplate.class, _vm.getTemplateId());
+            _template = s_entityMgr.findByIdIncludingRemoved(VirtualMachineTemplate.class,
_vm.getTemplateId());
         }
         return _template;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99cb1978/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 8eac2bb..211c32c 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -825,7 +825,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
         VMInstanceVO startedVm = null;
         ServiceOfferingVO offering = _offeringDao.findById(vm.getId(), vm.getServiceOfferingId());
-        VirtualMachineTemplate template = _entityMgr.findById(VirtualMachineTemplate.class,
vm.getTemplateId());
+        VirtualMachineTemplate template = _entityMgr.findByIdIncludingRemoved(VirtualMachineTemplate.class,
vm.getTemplateId());
 
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Trying to deploy VM, vm has dcId: " + vm.getDataCenterId() +
" and podId: " + vm.getPodIdToDeployIn());


Mime
View raw message