weizhouapache commented on code in PR #7877:
URL: https://github.com/apache/cloudstack/pull/7877#discussion_r1301348872
##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -547,14 +547,12 @@ public DomainRouterVO deployRouter(final
RouterDeploymentDefinition routerDeploy
reallocateRouterNetworks(routerDeploymentDefinition, router,
template, null);
router = _routerDao.findById(router.getId());
} catch (final InsufficientCapacityException ex) {
- if (allocateRetry < 2 && iter.hasNext()) {
+ if (iter.hasNext()) {
Review Comment:
`int allocateRetry = 0;` is defined before the `for` loop.
we could try twice for each hypervisor by
```
for (final Iterator<HypervisorType> iter = hypervisors.iterator();
iter.hasNext();) {
int allocateRetry = 0;
while (allocateRetry < 2) {
...
}
}
```
I think it is not needed. there was no such retry in the past.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]