nvazquez opened a new pull request, #12785: URL: https://github.com/apache/cloudstack/pull/12785
### Description This PR backports an issue fixed by PR #12487 for VPCs not using conserve mode. Since VPC Conserve mode is added on 4.23, only the logic that applies to this issue has been backported from the commit: https://github.com/apache/cloudstack/pull/12487/commits/b6fbdc37ef3c4bed6403d7644ae685e4ce9abe4c To reproduce the issue: - Create a VPC - Create two VPC tiers: Tier 1 and Tier 2. - Deploy one VM in each tier. - Acquire a public IP for the VPC. - Create a Port Forwarding rule on Tier 1, which associates the IP with Tier 1. - Attempt to create a Load Balancer rule using the same IP but specifying networkid=<tier2_id>. The issue has been detected using cmk (UI does not allow adding a VM to a LB from a different network). Before the fix: CloudStack allows the addition of VMs from different networks to the load balancer After the fix: ```` (localcloud) 🐱 > create loadbalancerrule privateport=8080 publicport=8080 name=LB algorithm=roundrobin publicipid=dd5d9043-86b4-44d3-80fd-f4523b9f69cd networkid=a97dce8b-6cd7-4bc0-807a-24dc515b5f34 🙈 Error: (HTTP 431, error code 9999) Cannot create Load Balancer rule LB as the IP address 10.0.60.206 is not associated with the network VPC-Default-T2 (ID=a97dce8b-6cd7-4bc0-807a-24dc515b5f34) ```` ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> #### How did you try to break this feature and the system with this change? <!-- see how your change affects other areas of the code, etc. --> <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> -- 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]
