shrikantjoshi-hpe opened a new pull request, #11919: URL: https://github.com/apache/cloudstack/pull/11919
### Description This PR introduces a new HPE Storage Pool Allocator implementation with an enhanced maxfree volume allocation algorithm for improved storage resource management in Apache CloudStack. Key Features 1. **New HPE Storage Pool Allocator** - Implements HPEStoragePoolAllocator.java extending AbstractStoragePoolAllocator - Provides HPE-specific storage allocation logic and optimizations - Maintains full compatibility with existing storage allocation workflows 2. **Enhanced Volume Allocation Algorithm - "maxfree"** - Introduces maxfree algorithm for intelligent storage pool selection - Implements storage pool ordering with reorderPoolsByFreeSpace() method - Reorders storage pools based on available free space in descending order - Pools with the most available free space will be prioritized first - Optimizes storage utilization by preventing storage pool exhaustion - Improves resource distribution across storage infrastructure **Algorithm Behavior** - Input: List of eligible storage pools - Processing: Sorts pools by available free capacity in descending order - Output: Reordered list with highest free space pools first - Benefit: Prevents premature storage pool exhaustion and maintains balanced utilization **Files Modified** - AbstractStoragePoolAllocator.java: Added reorderPoolsByFreeSpace() method for free space-based reordering - HPEStoragePoolAllocator.java: New HPE Storage-specific allocator implementation - spring-engine-storage-storage-allocator-context.xml: Register HPE Storage allocator bean - spring-core-registry-core-context.xml: Core registry configuration updates - VolumeOrchestrationService.java: Algorithm configuration support ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [X] 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 - [X] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [X] Major - [ ] Minor - [ ] Trivial ### How Has This Been Tested? **Unit Testing** - Verified reorderPoolsByFreeSpace() method correctly sorts pools by available free space (descending) - Tested algorithm selection logic with maxfree parameter - Validated capacity calculation accuracy for both local and shared storage pools - Confirmed Spring configuration loading and bean registration **Integration Testing** - Maxfree Algorithm Testing: Verified pools are consistently ordered by free space (highest first) - Backward Compatibility: Existing random and userdispersing algorithms work unchanged - Mixed Storage Types: Tested with combinations of local and shared storage pools - Capacity Edge Cases: Verified behavior with pools at various capacity levels (10%, 50%, 90%+ full) **System Testing** - Free Space Validation: Confirmed volumes consistently allocated to pools with highest free space - Capacity Distribution: Verified balanced storage utilization across multiple pools - Hypervisor Compatibility: Tested across KVM environments **Breaking Testing Attempts** - Capacity Gradient: Tested with pools having 95%, 70%, 45%, 20% free space - verified highest free space pools selected first - Dynamic Capacity Changes: Modified pool capacities during allocation - algorithm adapted correctly - Equal Capacity Pools: Multiple pools with identical free space - stable ordering maintained - Single Pool Scenarios: Algorithm works correctly with single pool environments -- 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]
