-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix priority for volume copy operation #11109
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
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11109 +/- ##
=========================================
Coverage 16.57% 16.57%
- Complexity 13968 13969 +1
=========================================
Files 5743 5743
Lines 510494 510495 +1
Branches 62075 62075
=========================================
+ Hits 84617 84621 +4
+ Misses 416415 416411 -4
- Partials 9462 9463 +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:
|
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
@DaanHoogland Is anything expected from us regarding the status:needs-testing label? I haven’t found any test coverage for the Primera plugin in the repository. Please advise. |
@shrikantjoshi-hpe , If there is no external hard- or software required, then we require an “external” reviewer to test it. So preferably not yourself. It will lower the bar if you add as extensive a test description as possible. If there is any proprietary stuff involved we “just” require regression tests performed. In any case a second review and testing is “external” required. |
@DaanHoogland, Thank you for the details. With this change there is no proprietary information involved. Regarding testing, we performed multiple tests related to these code changes, mainly following the workflow of bringing up instances in CloudStack using templates and monitoring the volume copy task performance using Primera plugin. There is no change in workflow for end users; this update simply improves the performance of volume copy tasks on the array. |
@shrikantjoshi-hpe , great. Try to find a second reviewer. Preferably someone still active that has changed the code that you touched. Couldn’t hurt to look at other storage vendors as well. |
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
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 enhances the Primera plugin’s volume copy operation by always assigning it high priority.
- Always sets the copy request’s priority to high (
1
) - No changes to workflows or APIs beyond priority level adjustment
Comments suppressed due to low confidence (2)
plugins/storage/volume/primera/src/main/java/org/apache/cloudstack/storage/datastore/adapter/primera/PrimeraAdapter.java:314
- Add unit or integration tests to verify that the
priority
parameter is correctly set to high for copy operations so this behavior is validated automatically.
parms.setPriority(1);
@@ -311,6 +311,7 @@ public ProviderVolume copy(ProviderAdapterContext context, ProviderAdapterDataOb | |||
|
|||
parms.setDestVolume(targetVolumeInfo.getExternalName()); | |||
parms.setOnline(false); | |||
parms.setPriority(1); |
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.
Replace the magic number 1
with a named constant or enum (e.g., PRIORITY_HIGH
) to clarify its meaning and improve maintainability.
Copilot uses AI. Check for mistakes.
@blueorangutan package |
@sureshanaparti 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 ✔️ debian ✔️ suse15. SL-JID 14040 |
@DaanHoogland, code change has been reviewed by a second reviewer as well. Can you now consider it for merging? |
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.
code LGTM
Description
This PR adds support to set the priority to high for volume copy operations using the Primera plugin.
This enhancement allows volume copy tasks handled by the Primera plugin to be prioritized as high, improving performance for critical operations. No changes to existing workflows or APIs; only the priority for copy operations is updated.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
N/A
How Has This Been Tested?
How did you try to break this feature and the system with this change?