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>
This commit is contained in:
Rohit Yadav 2018-10-25 09:20:39 +05:30 committed by GitHub
parent 9b35b64b3c
commit 9cf57d2568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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());
}

View File

@ -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());
}