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
This commit is contained in:
Sheng Yang 2011-08-23 18:13:14 -07:00
parent 4901c18d7a
commit 59fe551ebb
1 changed files with 5 additions and 0 deletions

View File

@ -988,6 +988,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();