This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch 4.18 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push: new 951ba04cf0e VR live patching: Allow live patch of VPC VRs even if networks are in allocated / shutdown state (#7958) 951ba04cf0e is described below commit 951ba04cf0eae3f48207306f0035a2292b55506d Author: Pearl Dsilva <pearl1...@gmail.com> AuthorDate: Mon Sep 25 11:04:23 2023 -0400 VR live patching: Allow live patch of VPC VRs even if networks are in allocated / shutdown state (#7958) --- .../cloudstack/engine/orchestration/NetworkOrchestrator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 82e13b5c5b8..11e27de8e99 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -28,6 +28,7 @@ import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.UUID; import java.util.concurrent.Executors; @@ -3516,7 +3517,12 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra setRestartRequired(network, restartRequired); return status; } else if (livePatch) { - List<DomainRouterVO> domainRouters = routerDao.listByNetworkAndRole(network.getId(), VirtualRouter.Role.VIRTUAL_ROUTER, VirtualRouter.Role.INTERNAL_LB_VM); + List<DomainRouterVO> domainRouters; + if (Objects.nonNull(network.getVpcId())) { + domainRouters = routerDao.listByVpcId(network.getVpcId()); + } else { + domainRouters = routerDao.listByNetworkAndRole(network.getId(), VirtualRouter.Role.VIRTUAL_ROUTER, VirtualRouter.Role.INTERNAL_LB_VM); + } for (DomainRouterVO router: domainRouters) { try { VMInstanceVO instanceVO = _vmDao.findById(router.getId());