cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 6c39c57
Date Fri, 05 Sep 2014 17:14:59 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 61892bb28 -> 6c39c5734


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/6c39c573
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c39c573
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c39c573

Branch: refs/heads/4.4
Commit: 6c39c57342df9d0ebb6b1c5524f5c337a270b285
Parents: 61892bb
Author: Loic Lambiel <lll@exoscale.ch>
Authored: Mon Sep 1 10:31:57 2014 +0200
Committer: Daan Hoogland <daan@onecht.net>
Committed: Fri Sep 5 17:49:36 2014 +0200

----------------------------------------------------------------------
 .../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/6c39c573/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/6c39c573/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 6edcf63..8a228ff 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -832,7 +832,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