mirror of https://github.com/apache/cloudstack.git
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
This commit is contained in:
parent
8837113abc
commit
22232f2baf
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue