From 87041202c086af4d3ebe74ee51635d4e67fdbd0e Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 10 Aug 2011 12:01:38 -0700 Subject: [PATCH] bug 11045: Fix exception exit of CheckRouterTask Catch all the exception and come back to work. status 11045: resolved fixed --- .../VirtualNetworkApplianceManagerImpl.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 661cb92cf46..9d345e9bb3b 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -828,15 +828,18 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian @Override public void run() { - - final List routers = _routerDao.listVirtualUpByHostId(null); - s_logger.debug("Found " + routers.size() + " running routers. "); + try { + final List 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); + } } }