bug 11045: Fix exception exit of CheckRouterTask

Catch all the exception and come back to work.

status 11045: resolved fixed
This commit is contained in:
Sheng Yang 2011-08-10 12:01:38 -07:00
parent dbd6fd9826
commit 87041202c0
1 changed files with 11 additions and 8 deletions

View File

@ -828,15 +828,18 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
@Override
public void run() {
final List<DomainRouterVO> routers = _routerDao.listVirtualUpByHostId(null);
s_logger.debug("Found " + routers.size() + " running routers. ");
try {
final List<DomainRouterVO> routers = _routerDao.listVirtualUpByHostId(null);
s_logger.debug("Found " + routers.size() + " running routers. ");
updateRoutersRedundantState(routers);
/* FIXME assumed the a pair of redundant routers managed by same mgmt server,
* then the update above can get the latest status */
checkDuplicateMaster(routers);
updateRoutersRedundantState(routers);
/* FIXME assumed the a pair of redundant routers managed by same mgmt server,
* then the update above can get the latest status */
checkDuplicateMaster(routers);
} catch (Exception ex) {
s_logger.error("Fail to complete the CheckRouterTask! ", ex);
}
}
}