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

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


The following commit(s) were added to refs/heads/4.19 by this push:
     new 075b4130412 Fix VR inheriting boot settings from user's VM (#8894)
075b4130412 is described below

commit 075b4130412a3b4e094b1158c91fb82d440d0f64
Author: Henrique Sato <henriquesato2...@gmail.com>
AuthorDate: Tue Apr 16 11:54:16 2024 -0300

    Fix VR inheriting boot settings from user's VM (#8894)
    
    Co-authored-by: Henrique Sato <henrique.s...@scclouds.com.br>
---
 .../cloud/network/element/VirtualRouterElement.java  | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git 
a/server/src/main/java/com/cloud/network/element/VirtualRouterElement.java 
b/server/src/main/java/com/cloud/network/element/VirtualRouterElement.java
index 839ab9ae0af..52f5273dac4 100644
--- a/server/src/main/java/com/cloud/network/element/VirtualRouterElement.java
+++ b/server/src/main/java/com/cloud/network/element/VirtualRouterElement.java
@@ -219,7 +219,7 @@ NetworkMigrationResponder, AggregatedCommandExecutor, 
RedundantResource, DnsServ
             return false;
         }
 
-        final Map<VirtualMachineProfile.Param, Object> params = new 
HashMap<VirtualMachineProfile.Param, Object>(1);
+        final Map<VirtualMachineProfile.Param, Object> params = new 
HashMap<>(1);
         params.put(VirtualMachineProfile.Param.ReProgramGuestNetworks, true);
 
         if (network.isRollingRestart()) {
@@ -264,27 +264,13 @@ NetworkMigrationResponder, AggregatedCommandExecutor, 
RedundantResource, DnsServ
             return false;
         }
 
-        final NetworkOfferingVO offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
-        if (offering.isSystemOnly()) {
-            return false;
-        }
         if 
(!_networkMdl.isProviderEnabledInPhysicalNetwork(_networkMdl.getPhysicalNetworkId(network),
 getProvider().getName())) {
             return false;
         }
 
-        final RouterDeploymentDefinition routerDeploymentDefinition =
-                routerDeploymentDefinitionBuilder.create()
-                .setGuestNetwork(network)
-                .setDeployDestination(dest)
-                
.setAccountOwner(_accountMgr.getAccount(network.getAccountId()))
-                .setParams(vm.getParameters())
-                .build();
-
-        final List<DomainRouterVO> routers = 
routerDeploymentDefinition.deployVirtualRouter();
+        final NetworkOfferingVO offering = 
_networkOfferingDao.findById(network.getNetworkOfferingId());
+        implement(network, offering, dest, context);
 
-        if (routers == null || routers.size() == 0) {
-            throw new ResourceUnavailableException("Can't find at least one 
running router!", DataCenter.class, network.getDataCenterId());
-        }
         return true;
     }
 

Reply via email to