MashrafeeAryan opened a new pull request, #14551: URL: https://github.com/apache/cloudstack/pull/14551
### Description Fixes: #14253 CloudStack could give a management server a new ID after a restart if it chose a different network card. This could prevent agents from reconnecting. This PR saves the server ID in a file and reuses it after restarts. It also makes the other affected parts of CloudStack use the same ID. I also updated the avoid list so an old Down record does not block an address that has an Up record. This helps installations already affected by the bug. (I am not sure if this is necessary. I am open to removing this part from the PR) The main changes I did: - Save the ID once and reuse it after restarts - Use the shared ID for server identity, statistics jobs, network usage, and router management - Let admins choose an ID or a different file location when needed - Stop old duplicate records from making agents skip an address marked Up ### 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) #### Bug Severity - [ ] BLOCKER - [ ] Critical - [] Major - [x] Minor - [ ] Trivial #### How Has This Been Tested? Built the management server and ran 17 automated tests on Windows using OpenJDK 11 and Maven 3.9.9. All 17 tests passed: - `ManagementServerIdTest`: 11 tests - `ManagementServerHostDaoImplTest`: 4 tests - `ManagementServerIdentityTest`: 2 tests Whitespace checks also passed. ### How did you try to break this feature and the system with this change? - Changed the MAC-based ID and checked that the saved ID was still used - Tried bad IDs, broken file paths, and failed writes - Had three programs use the same ID file at once - Checked that old offline records do not block an address marked Up - Checked that the right server still starts its statistics update -- 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]
