mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
NaaS: Destroy virtual router when cleanup=true at shutdown
As we did in the restart() function.
This commit is contained in:
parent
e1e96c0bb3
commit
bf4e21f315
@ -357,8 +357,16 @@ public class VirtualRouterElement extends DhcpElement implements VirtualRouterEl
|
||||
}
|
||||
boolean result = true;
|
||||
for (DomainRouterVO router : routers) {
|
||||
//FIXME - Sheng, for your redundant router you have to destroy the domR here if clenaup=true - just the way you did in restart() method
|
||||
result = result && _routerMgr.stop(router, false, context.getCaller(), context.getAccount()) != null;
|
||||
if (cleanup) {
|
||||
if (!result) {
|
||||
s_logger.warn("Failed to stop virtual router element " + router + ", but would try to process clean up anyway.");
|
||||
}
|
||||
result = (_routerMgr.destroyRouter(router.getId()) != null);
|
||||
if (!result) {
|
||||
s_logger.warn("Failed to clean up virtual router element " + router);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user