Fix restartNetwork command on destroying virtual router

This commit is contained in:
Sheng Yang 2011-07-19 11:54:32 -07:00
parent 58d107180b
commit aa8fc81790
1 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,10 @@ public class VirtualRouterElement extends DhcpElement implements NetworkElement
for (DomainRouterVO router : routers) {
if (canHandle(network.getGuestType(), dest.getDataCenter())) {
host_id = router.getHostId();
_routerMgr.stopRouter(router.getId(), true);
if (_routerMgr.stopRouter(router.getId(), false) == null) {
s_logger.warn("Failed to stop virtual router element " + router + " as a part of netowrk " + network + " restart");
ret = false;
}
result = _routerMgr.destroyRouter(router.getId());
if (!result) {
s_logger.warn("Failed to destroy virtual router element " + router + " as a part of netowrk " + network + " restart");