To let the customers aware about an expected behavior when trying to add dublicate entry of pool-member-IP+port combination in same pool.
Symptoms:
1. You are using NSX-T Load-Balancer to host Virtual-Servers
2. Over UI or API you are trying to add a pool-member to a pool and you are getting the similar error,
UI:
API:
{ "httpStatus" : "BAD_REQUEST", "error_code" : 502001, "module_name" : "policy", "error_message" : "Errors validating path=[/infra/lb-pools/Test-Pool].", "related_errors" : [ { "httpStatus" : "BAD_REQUEST", "error_code" : 502017, "module_name" : "policy", "error_message" : "There are more than one IpAddressPortPair in the IpPortList which have the same IP address 172.16.10.100 and port 22." } ] }
3. Additionally on the 'nsxapi.log' on NSX-T Manager you would be seeing the similar error as well,
2024-02-29T07:24:50.435Z ERROR http-nio-127.0.0.1-7440-exec-10 LbPoolServiceImpl 4886 POLICY [nsx@6876 comp="nsx-manager" errorCode="PM502017" level="ERROR" reqId="dc31ef3d-####-####-####-########353" subcomp="manager" username="admin"] There are more than one pool member which have the same IP address 172.16.10.100 and port 22 2024-02-29T07:24:50.449Z INFO http-nio-127.0.0.1-7440-exec-10 NsxBaseRestController 4886 SYSTEM [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Error in API /nsxapi/api/v1/infra/lb-pools/Test-Pool caused by exception com.vmware.nsx.management.policy.loadbalancer.exceptions.LoadBalancerException: {"moduleName":"policy","errorCode":502001,"errorMessage":"Errors validating path=[/infra/lb-pools/Test-Pool].","relatedErrors":[{"moduleName":"policy","errorCode":502017,"errorMessage":"There are more than one IpAddressPortPair in the IpPortList which have the same IP address 172.16.10.100 and port 22."}]} 2024-02-29T07:24:50.449Z INFO http-nio-127.0.0.1-7440-exec-10 NsxBaseRestController 4886 SYSTEM [nsx@6876 audit="true" comp="nsx-manager" level="INFO" subcomp="manager"] UserName:'admin' ModuleName:'policy' Operation:'PUT@/api/v1/infra/lb-pools/Test-Pool' Operation status: 'failure' Error: Errors validating path=[/infra/lb-pools/Test-Pool].
In an NSX-T load-balancer pool we add pool-members to distribute the traffic between them. Hence, in the same pool, if we try to add multiple entries for same pool-member-IP+Port combination, that configuration is invalid in nature. To prevent such type of misconfiguration to be pushed in the data-plane, NSX-T manager have a validation workflow which detects this type of misconfiguration and throws error to let the administrator aware.