Adding the router priority when the control interface is created Adding some logging to the check heartbeat script
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d9e27b07 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d9e27b07 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d9e27b07 Branch: refs/heads/feature/systemvm-persistent-config Commit: d9e27b072eb338fb9d8add968e903627b95ad41b Parents: f240463 Author: wilderrodrigues <[email protected]> Authored: Tue Jan 27 19:25:54 2015 +0100 Committer: wilderrodrigues <[email protected]> Committed: Mon Feb 16 16:08:38 2015 +0100 ---------------------------------------------------------------------- .../cloud/network/router/VirtualNetworkApplianceManagerImpl.java | 3 ++- .../debian/config/opt/cloud/templates/check_heartbeat.sh.templ | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d9e27b07/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 1c32c7e..eb6496c 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -1542,7 +1542,6 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine> { final String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIp4Address()) | ~NetUtils.ip2Long(guestNic.getNetmask())); buf.append(" guestbrd=").append(brd); buf.append(" guestcidrsize=").append(NetUtils.getCidrSize(guestNic.getNetmask())); - buf.append(" router_pr=").append(router.getPriority()); final int advertInt = NumbersUtil.parseInt(_configDao.getValue(Config.RedundantRouterVrrpInterval.key()), 1); buf.append(" advert_int=").append(advertInt); @@ -1621,6 +1620,8 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine> { final int priority = getUpdatedPriority(network, routers, router); router.setPriority(priority); router = _routerDao.persist(router); + + buf.append(" router_pr=").append(router.getPriority()); } catch (final InsufficientVirtualNetworkCapacityException e) { s_logger.error("Failed to get update priority!", e); throw new CloudRuntimeException("Failed to get update priority!"); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d9e27b07/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ b/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ index 2bfb7cd..4131159 100755 --- a/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ +++ b/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ @@ -38,6 +38,7 @@ then if [ -e $STRIKE_FILE ] then rm $STRIKE_FILE + echo keepalived.strikes file was removed! >> $ROUTER_LOG else echo keepalived.strikes file does not exist! >> $ROUTER_LOG fi
