-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cleanup userconcentratedpod_random and userconcentratedpod_firstfit allocation algorithms #12233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12233 +/- ##
=========================================
Coverage 17.45% 17.46%
- Complexity 15513 15516 +3
=========================================
Files 5913 5913
Lines 529385 529392 +7
Branches 64679 64680 +1
=========================================
+ Hits 92426 92448 +22
+ Misses 426541 426525 -16
- Partials 10418 10419 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
Outdated
Show resolved
Hide resolved
|
I edtitted the description @sudo87, hope you like my version. looks good other wise but needs testing to make sure it is complete. |
b0c4f5b to
3bbbb26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes redundant allocation algorithms userconcentratedpod_random and userconcentratedpod_firstfit which behaved identically to their base counterparts random and firstfit respectively.
Key Changes:
- Removed enum values for redundant allocation algorithms from
DeploymentPlanner.AllocationAlgorithm - Updated configuration descriptions and options to exclude the deprecated algorithms
- Simplified code logic that previously checked for the redundant algorithm names
- Added database migration scripts to automatically convert existing configurations to use the base algorithm names
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| api/src/main/java/com/cloud/deploy/DeploymentPlanner.java | Removed userconcentratedpod_random and userconcentratedpod_firstfit from the AllocationAlgorithm enum |
| api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java | Updated ConfigKey description and options to exclude deprecated algorithms for VM allocation |
| engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java | Updated ConfigKey description and options to exclude deprecated algorithms for volume allocation |
| server/src/main/java/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java | Simplified conditional logic by removing check for userconcentratedpod_random |
| engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java | Simplified conditional logic by removing check for userconcentratedpod_random |
| engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql | Added SQL migration to convert existing configurations from deprecated to base algorithm names |
| engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.java | Implemented getPrepareScripts() to execute the migration SQL script |
| engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java | Changed from enum references to string literals to maintain backward compatibility after enum values are removed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@rajujith a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16051 |
Description
This PR cleans up following vm and volume allocation algorithms which are redundant and behave same as “random" and “firstfit”, without the "userconcentrated" :
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?