wido opened a new pull request, #13719: URL: https://github.com/apache/cloudstack/pull/13719
### Description A still-running agent whose host was deleted keeps its locally-persisted GUID and reconnects indefinitely. The management server looks up hosts by GUID excluding removed rows, so it fails to recognize the returning agent and re-registers it as a brand-new host. The existing 'add.host.on.service.restart.kvm' setting only guards this agent-side, for KVM/LXC, and only when the agent is still connected at delete time. Enforce that setting's intent on the management server: when 'add.host.on.service.restart.kvm' is false, refuse an agent whose GUID matches a previously deleted host. This also covers the case where the agent was offline when the host was deleted, and applies to all hypervisor types. - Preserve the host GUID on the soft-deleted record so the returning agent can be recognized (deleteHost no longer nulls the GUID). - Add HostDao.findByGuidIncludingRemoved / findByGuidPrefixIncludingRemoved. - getNewHost now rejects re-registration via rejectReAddOfDeletedHost. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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 - [x] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial -- 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]
