cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: updated refs/heads/master to 07c4aec
Date Wed, 13 Nov 2013 08:03:43 GMT
Updated Branches:
  refs/heads/master c6195c355 -> 07c4aec64


Newly added VR monitoring service has broken VMware basic network mode.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/07c4aec6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/07c4aec6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/07c4aec6

Branch: refs/heads/master
Commit: 07c4aec64ba079fdf5306c87735b3d5c70371012
Parents: c6195c3
Author: Kelven Yang <kelven.yang@citrix.com>
Authored: Tue Nov 12 23:48:56 2013 -0800
Committer: Kelven Yang <kelven.yang@citrix.com>
Committed: Tue Nov 12 23:49:45 2013 -0800

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManagerImpl.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/07c4aec6/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 5ac03b0..a088a4a 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2210,12 +2210,12 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
 
             finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNetworkId);
         }
-        finalizeMonitorServiceOnStrat(cmds, router, provider, routerGuestNtwkIds.get(0));
+        finalizeMonitorServiceOnStrat(cmds, profile, router, provider, routerGuestNtwkIds.get(0));
 
         return true;
     }
 
-    private void finalizeMonitorServiceOnStrat(Commands cmds, DomainRouterVO router, Provider
provider, long networkId) {
+    private void finalizeMonitorServiceOnStrat(Commands cmds, VirtualMachineProfile profile,
DomainRouterVO router, Provider provider, long networkId) {
 
         NetworkVO network = _networkDao.findById(networkId);
 
@@ -2248,18 +2248,18 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
             servicesTO.add(serviceTO);
         }
 
+        // TODO : This is a hacking fix
+        // at VR startup time, information in VirtualMachineProfile may not updated to DB
yet, 
+        // getRouterControlIp() may give wrong IP under basic network mode in VMware environment
+        NicProfile controlNic = getControlNic(profile);
         SetMonitorServiceCommand command = new SetMonitorServiceCommand(servicesTO);
-        command.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
+        command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address());
         command.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(networkId,
router.getId()));
         command.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
 
         cmds.addCommand("monitor", command);
     }
 
-
-
-
-
     protected NicProfile getControlNic(VirtualMachineProfile profile) {
         DomainRouterVO router = _routerDao.findById(profile.getId());
         DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());


Mime
View raw message