server: fix list public ip returns duplicated records#5464
Conversation
| sc2.setParameters("ids", freeAddrIds.toArray()); | ||
| addrs.addAll(_publicIpAddressDao.search(sc2, searchFilter)); // Allocated + Free | ||
| } | ||
| Collections.sort(addrs, Comparator.comparing(IPAddressVO::getAddress)); |
There was a problem hiding this comment.
@nvazquez @rhtyd
do we need to order public ip address ?
| } | ||
|
|
||
| buildParameters(sb, cmd); | ||
| buildParameters(sb, cmd, true); |
There was a problem hiding this comment.
@weizhouapache If isAllocated is hardcoded in both the buildParameters() calls, where exactly we use the 'allocatedonly' parameter from listPublicIpAddresses API cmd.
There was a problem hiding this comment.
@sureshanaparti good point.
isAllocated is used in line 2136.
I updated this pr to fix an issue with shared networks.
|
@blueorangutan package |
nvazquez
left a comment
There was a problem hiding this comment.
LGTM, can you target it for main branch?
|
blueorangutan
@nvazquez 4.15.2.0 will be released soon. should we commit bug fix to 4.15 ? |
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 1313 |
|
@weizhouapache IMO it shouldn't as it is not a blocker, let's ask @rhtyd |
@nvazquez 4.15 branch has version 4.15.3.0-SNAPSHOT now. |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
davidjumani
left a comment
There was a problem hiding this comment.
Verified, records are not duplicated
|
Trillian test result (tid-2120)
|
* server: fix list public ip returns duplicated records * update apache#5464: fix shared network (cherry picked from commit f50cc27) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
This PR fixes the issue that "Free" public ip addresses are listed twice in api response.
there is no issue with api if domainid, account or allocatedonly=true is passed.
there is no issue on UI.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?