vmware-archive / powernsx

PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions
173 stars 90 forks source link

Fixing bug in New-NsxLoadBalancerPool #611

Open Nick-Andreev opened 4 years ago

Nick-Andreev commented 4 years ago

Fixing a bug in New-NsxLoadBalancerPool, where it fails to create a new pool on the Edge, when Edge already has one existing pool and one existing VIP.

This is the error message you get:

WebException: The remote server returned an error: (500) Internal Server Error.
        InternalNsxApiException: Invoke-NsxWebRequest : The NSX API response received indicates a failure. 500 : Internal Server Error : Response Body: {"errorCode":100,"details":null,"rootCauseString":null,"moduleName":null,"errorData":null}
        at Invoke-NsxWebRequest, PowerNSX.psm1: line 4354
        at New-NsxLoadBalancerPool<Process>, PowerNSX.psm1: line 31115
        at Get-NsxLoadBalancer<Process>, PowerNSX.psm1: line 30094
        at Get-NsxEdge, PowerNSX.psm1: line 13527

All credit goes to @neoxinth who fixed this in pull request #435. I just added a Pester test for this bug for regression testing purposes.

There is a full explanation of why this issue happens in the first place, which you can find in the discussion thread for #435.

alagoutte commented 4 years ago

LGTM @dcoghlan can you launch test suite ?

dcoghlan commented 3 years ago

jenkins test this please

powernsxbot commented 3 years ago

Tests Successful