From 20d97158169fda8469cf166b7eadf2a2f8ef3680 Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Wed, 11 Feb 2015 20:12:49 +0100 Subject: [PATCH] One of the routers is not running, so we don't have to continue here since the host will be null any way. Also, there is no need To check either for sanity of duplicate master. Thus, just update the state and get lost. --- .../router/VirtualNetworkApplianceManagerImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 5a97eb32982..42537c16aeb 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -1174,6 +1174,15 @@ Configurable, StateListener { */ final DomainRouterVO router0 = routers.get(0); final DomainRouterVO router1 = routers.get(1); + + if (router0.getState() != State.Running || router1.getState() != State.Running) { + updateRoutersRedundantState(routers); + // Wilder Rodrigues (wrodrigues@schubergphilis.com) - One of the routers is not running, + // so we don't have to continue here since the host will be null any way. Also, there is no need + // To check either for sanity of duplicate master. Thus, just update the state and get lost. + continue; + } + DomainRouterVO router = router0; if (router0.getId() < router1.getId()) { router = router0;