You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/06/22 00:30:27 UTC

git commit: updated refs/heads/master to 22232f2

Updated Branches:
  refs/heads/master 8837113ab -> 22232f2ba


CLOUDSTACK-2698: always generate new id when create VirtualRouter. Don't try to re-use the id of the VR that failed to deploy and was expunged as a result of this failure


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

Branch: refs/heads/master
Commit: 22232f2baf6c0291eabf82da4318ffee6001e593
Parents: 8837113
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Fri Jun 21 15:21:51 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Fri Jun 21 15:29:00 2013 -0700

----------------------------------------------------------------------
 .../network/lb/InternalLoadBalancerVMManagerImpl.java    | 11 +++++------
 .../router/VirtualNetworkApplianceManagerImpl.java       | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22232f2b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
index 2bdb28f..c633d57 100644
--- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
+++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
@@ -752,10 +752,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements
             InsufficientAddressCapacityException, InsufficientServerCapacityException, InsufficientCapacityException,
             StorageUnavailableException, ResourceUnavailableException {
         
-        long id = _internalLbVmDao.getNextInSequence(Long.class, "id");
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Creating the internal lb vm " + id + " in datacenter "  + dest.getDataCenter());
-        }
+       
 
         ServiceOfferingVO routerOffering = _serviceOfferingDao.findById(svcOffId);
 
@@ -769,8 +766,10 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements
         for (Iterator<HypervisorType> iter = hypervisors.iterator(); iter.hasNext();) {
             HypervisorType hType = iter.next();
             try {
-                s_logger.debug("Allocating the Internal lb with the hypervisor type " + hType);
-                String templateName = null;
+                long id = _internalLbVmDao.getNextInSequence(Long.class, "id");
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Creating the internal lb vm " + id + " in datacenter "  + dest.getDataCenter() + " with hypervisor type " + hType);
+                }                String templateName = null;
                 switch (hType) {
                     case XenServer:
                         templateName = _configServer.getConfigValue(Config.RouterTemplateXen.key(), Config.ConfigurationParameterScope.zone.toString(), dest.getDataCenter().getId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22232f2b/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 3489dbf..fbb8cf2 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1585,11 +1585,6 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
             Long vpcId, List<Pair<NetworkVO, NicProfile>> networks, boolean startRouter, List<HypervisorType> supportedHypervisors) throws ConcurrentOperationException,
             InsufficientAddressCapacityException, InsufficientServerCapacityException, InsufficientCapacityException,
             StorageUnavailableException, ResourceUnavailableException {
-        
-        long id = _routerDao.getNextInSequence(Long.class, "id");
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Creating the router " + id + " in datacenter "  + dest.getDataCenter());
-        }
 
         ServiceOfferingVO routerOffering = _serviceOfferingDao.findById(svcOffId);
 
@@ -1603,7 +1598,11 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
         for (Iterator<HypervisorType> iter = hypervisors.iterator(); iter.hasNext();) {
             HypervisorType hType = iter.next();
             try {
-                s_logger.debug("Allocating the domR with the hypervisor type " + hType);
+                long id = _routerDao.getNextInSequence(Long.class, "id");
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Allocating the VR i="+ id + " in datacenter "  + dest.getDataCenter() + "with the hypervisor type " + hType);
+                }
+                
                 String templateName = null;
                 switch (hType) {
                     case XenServer: