-
Notifications
You must be signed in to change notification settings - Fork 1.3k
refactor storepool automation #11789
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
refactor storepool automation #11789
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11789 +/- ##
=========================================
Coverage 16.17% 16.17%
- Complexity 13297 13298 +1
=========================================
Files 5656 5656
Lines 498331 498326 -5
Branches 60476 60463 -13
=========================================
Hits 80591 80591
+ Misses 408767 408763 -4
+ Partials 8973 8972 -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:
|
JoaoJandre
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, did not test it.
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 refactors the StoragePoolAutomationImpl class by breaking down its two large methods (maintain and cancelMaintain) into smaller, more focused helper methods and consolidating duplicated code.
Key changes:
- Extracted multiple helper methods from the large
maintainandcancelMaintainmethods - Consolidated VM handling logic into reusable methods
- Removed unused imports and injected dependencies
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
1 similar comment
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan test |
|
@rosi-shapeblue a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14651)
|
|
@blueorangutan package |
|
@DaanHoogland 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 15949 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@DaanHoogland , I tested the HA scenario on 4.20.2 Action: Enable HA on a user VM → prepare primary storage pool for maintenance. This is not a regression, caused by the PR. Evidence Baseline: Environment Setup Zone, Cluster, and Hosts confirmed operational: Primary Storage 1 and Primary Storage 2 are in Up state: Database clean - no stale records: Test Setup: Created HA-enabled Service Offering and Deployed Test VMs Deployed two VMs - one with HA, one without: Pre-Maintenance: VM Storage Location HA VM (i-2-5-VM) hosted on Primary Storage 1 (ID: 1383bf9b-b82e-3566-9bca-769b4b69227d): Non-HA VM (i-2-3-VM) hosted on Primary Storage 2 (ID: d2d00507-fb67-3329-a32d-775c637a0ba3): Enabled Maintenance on Primary Storage 1 Post-Maintenance Results Storage Pool State: VM States - HA VM did NOT auto-restart: HA VM not running on hypervisor: Database Evidence: vm_id=5 (HA VM i-2-5-VM): stopped_for_maintenance=1, started_after_maintenance=0 ✗ Should be 1 |
RosiKyu
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.
LGTM
Test results can be found here: #11789 (comment)
NOTE The HA issue, noted in the test results is not a regression, caused by this PR
|
[SF] Trillian test result (tid-14929)
|
|
[SF] Trillian test result (tid-14956)
|
|
different errors on two consecutive runs. Calling those noise neighbour artifacts. |



















Description
This PR cleans up the StoragePoolAutomationImpl class to reduce its two big methods and reuse some code.
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?