From 0d075906ad40b0bd681ece777045684379ba93a5 Mon Sep 17 00:00:00 2001 From: Wilder Rodrigues Date: Fri, 11 Dec 2015 07:51:22 +0100 Subject: [PATCH] CLOUDSTACK-4374 - Adds HA capabilities to redundant routers - Redundant Routers are not the same as Haigh Available. Having a router HA is actually saying that the given router will be controlled by the High Availability monitor. Hence fix any problem we might face. --- .../com/cloud/network/router/NetworkHelperImpl.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java index 302a9f10d3b..f396fdd840a 100644 --- a/server/src/com/cloud/network/router/NetworkHelperImpl.java +++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java @@ -472,14 +472,7 @@ public class NetworkHelperImpl implements NetworkHelper { continue; } - boolean offerHA = routerOffering.getOfferHA(); - /* - * We don't provide HA to redundant router VMs, admin should own - * it all, and redundant router themselves are HA - */ - if (routerDeploymentDefinition.isRedundant()) { - offerHA = false; - } + final boolean offerHA = routerOffering.getOfferHA(); // routerDeploymentDefinition.getVpc().getId() ==> do not use // VPC because it is not a VPC offering. @@ -487,7 +480,7 @@ public class NetworkHelperImpl implements NetworkHelper { long userId = CallContext.current().getCallingUserId(); if (CallContext.current().getCallingAccount().getId() != owner.getId()) { - List userVOs = _userDao.listByAccount(owner.getAccountId()); + final List userVOs = _userDao.listByAccount(owner.getAccountId()); if (!userVOs.isEmpty()) { userId = userVOs.get(0).getId(); }