From fb6fb03175b267cbcc1c4175c14dee99dc330275 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Tue, 23 Aug 2011 18:13:14 -0700 Subject: [PATCH] bug 11214: Don't try to start the running router again It's very like caused by StartRouterCmd sent to the running router. I can reproduce it by issue a StartRouterCmd to a running redundant router. And this patch should the following exception: Exception: com.cloud.exception.ResourceUnavailableException: Resource [VirtualNetworkApplianceManagerImpl$$EnhancerByCGLIB$$565b4d45:0] is unreachable: There are already two redundant routers with IP 10.91.32.126, they are r-5-VM(5) and r-4-VM(4) status 11214: resolved fixed --- .../network/router/VirtualNetworkApplianceManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index e8a0aed20a8..fd7148c74a2 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -981,6 +981,11 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian return this.start(router, user, caller, params, null); } + if (router.getState() == State.Running) { + s_logger.debug("Redundant router " + router.getInstanceName() + " is already running!"); + return router; + } + DataCenterDeployment plan = new DataCenterDeployment(0, null, null, null, null); DomainRouterVO result = null; assert router.getIsRedundantRouter();