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 2018/10/25 03:50:47 UTC

[cloudstack] branch 4.11 updated: network: on rolling restart force stop old routers (#2926)

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

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


The following commit(s) were added to refs/heads/4.11 by this push:
     new 9cf57d2  network: on rolling restart force stop old routers (#2926)
9cf57d2 is described below

commit 9cf57d2568764cd42d21bc53e5ffaf97f3380732
Author: Rohit Yadav <ro...@apache.org>
AuthorDate: Thu Oct 25 09:20:39 2018 +0530

    network: on rolling restart force stop old routers (#2926)
    
    This force stops old VRs when performing rolling restart with
    cleanup=true. This will ensure that VRs are powered off quickly than
    wait longer for the normal ACPI shutdown. During testing, it was found
    on VMware where VM stops are slow compared to XenServer and KVM.
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 .../org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java  | 1 +
 server/src/com/cloud/network/vpc/VpcManagerImpl.java                     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 55015ce..9f4778e 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -2959,6 +2959,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
         // Destroy old routers
         for (final DomainRouterVO oldRouter : oldRouters) {
+            _routerService.stopRouter(oldRouter.getId(), true);
             _routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId());
         }
 
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index b8a797b..548fb4d 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -2490,6 +2490,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
 
         // Destroy old routers
         for (final DomainRouterVO oldRouter : oldRouters) {
+            _routerService.stopRouter(oldRouter.getId(), true);
             _routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId());
         }