Pearl1594 opened a new pull request, #11457: URL: https://github.com/apache/cloudstack/pull/11457
### Description Fixes: https://github.com/apache/cloudstack/issues/11252 This PR fixes issue with deploying CKS clusters in basic zones. This happens because when deploying the control node, an IP from the shared network IP pool is allocated to it i.e., marked as allocated, but allocatedTime isn't set. When attempt is then made to reserve an IP for the virtual router, it runs the following query: `SELECT u.* FROM user_ip_address u INNER JOIN vlan v ON v.id = u.vlan_db_id INNER JOIN pod_vlan_map pvm ON pvm.vlan_db_id = u.vlan_db_id WHERE u.data_center_id = ? AND v.vlan_type = "DirectAttached" AND v.network_id = ? AND u.allocated IS NULL and u.vlan_db_id = ? AND u.forsystemvms = 0 ORDER BY u.forsystemvms ASC, u.vlan_db_id ASC LIMIT = 1` where it gets the 1st IP that has allocated (allocatedtime) as null, so it returns an IP that has already been assigned to the control node. To address the issue, if the allocated time is set along with updating the state, this issue will not be encountered. <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> <!--- ******************************************************************************* --> <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ******************************************************************************* --> ### 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 #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? Deployed CKS cluster in a basic zone <img width="1070" height="880" alt="image" src="https://github.com/user-attachments/assets/5b5173ce-357d-4bc0-aa6b-bf14571cbf4f" /> <img width="1662" height="880" alt="image" src="https://github.com/user-attachments/assets/4abc6d91-928d-458e-a5da-660659c14abd" /> <!-- 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]
