ZhyliaievD commented on code in PR #12835:
URL: https://github.com/apache/cloudstack/pull/12835#discussion_r3056574119
##########
plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxApiClient.java:
##########
@@ -656,9 +659,19 @@ List<LBPoolMember>
getLbPoolMembers(List<NsxLoadBalancerMember> memberList, Stri
public void createNsxLbServerPool(List<NsxLoadBalancerMember> memberList,
String tier1GatewayName, String lbServerPoolName,
String algorithm, String privatePort,
String protocol) {
try {
- String activeMonitorPath =
getLbActiveMonitorPath(lbServerPoolName, privatePort, protocol);
List<LBPoolMember> members = getLbPoolMembers(memberList,
tier1GatewayName);
LbPools lbPools = (LbPools) nsxService.apply(LbPools.class);
+ Optional<LBPool> nsxLbServerPool = getNsxLbServerPool(lbPools,
lbServerPoolName);
+ // Skip if pool exists and members unchanged
+ if (nsxLbServerPool.isPresent()) {
+ List<LBPoolMember> existingMembers = nsxLbServerPool
+ .map(LBPool::getMembers)
+ .orElseGet(List::of);
+ if (hasSamePoolMembers(existingMembers, members)) {
+ return;
Review Comment:
Debug log added, tnx
--
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]