bug 11105: Fix router with disconnected host

We keep the stopped router there, but continue with the ones we can use.

status bug 11105: resolved fixed
This commit is contained in:
Sheng Yang 2011-08-12 19:10:15 -07:00 committed by alena
parent 05713a20e8
commit 23674a5386
1 changed files with 4 additions and 8 deletions

View File

@ -1053,14 +1053,10 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
}
for (DomainRouterVO router : routers) {
boolean skip = false;
if (router.getHostId() != null) {
HostVO host = _hostDao.findById(router.getHostId());
if (host == null || host.getStatus() != Status.Up) {
skip = true;
}
}
if (!skip) {
HostVO host = _hostDao.findById(router.getHostId());
if (host != null && host.getStatus() == Status.Up) {
State state = router.getState();
if (state != State.Running) {
router = startVirtualRouter(router, _accountService.getSystemUser(), _accountService.getSystemAccount(), params);