Skip to content

Commit 9cf57d2

Browse files
authored
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 <rohit.yadav@shapeblue.com>
1 parent 9b35b64 commit 9cf57d2

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,7 @@ private boolean rollingRestartRouters(final NetworkVO network, final NetworkOffe
29592959

29602960
// Destroy old routers
29612961
for (final DomainRouterVO oldRouter : oldRouters) {
2962+
_routerService.stopRouter(oldRouter.getId(), true);
29622963
_routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId());
29632964
}
29642965

server/src/com/cloud/network/vpc/VpcManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,6 +2490,7 @@ private boolean rollingRestartVpc(final Vpc vpc, final ReservationContext contex
24902490

24912491
// Destroy old routers
24922492
for (final DomainRouterVO oldRouter : oldRouters) {
2493+
_routerService.stopRouter(oldRouter.getId(), true);
24932494
_routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId());
24942495
}
24952496

0 commit comments

Comments
 (0)