You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/11/24 09:38:27 UTC

[cloudstack] branch 4.17 updated: orchestration: fix diskoffering for vr rootdisk (#6853)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new c8d27765d80 orchestration: fix diskoffering for vr rootdisk (#6853)
c8d27765d80 is described below

commit c8d27765d80186a8b51592b0c1030aab61d1909c
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Thu Nov 24 15:08:20 2022 +0530

    orchestration: fix diskoffering for vr rootdisk (#6853)
    
    Fixes incorrect call of using service offering's ID while trying to retrieve linked disk offering.
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
 .../src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
index 64e4ad89154..db600d28dd4 100755
--- a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -524,7 +524,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
     @Override
     public void allocate(final String vmInstanceName, final VirtualMachineTemplate template, final ServiceOffering serviceOffering,
             final LinkedHashMap<? extends Network, List<? extends NicProfile>> networks, final DeploymentPlan plan, final HypervisorType hyperType) throws InsufficientCapacityException {
-        DiskOffering diskOffering = _diskOfferingDao.findById(serviceOffering.getId());
+        DiskOffering diskOffering = _diskOfferingDao.findById(serviceOffering.getDiskOfferingId());
         allocate(vmInstanceName, template, serviceOffering, new DiskOfferingInfo(diskOffering), new ArrayList<>(), networks, plan, hyperType, null, null);
     }