Skip to content

Conversation

@shrikantjoshi-hpe
Copy link
Contributor

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

  • 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)
  • 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
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

N/A

How Has This Been Tested?

  • Manually tested the volume copy operation using the Primera plugin.
  • Verified that the copy operation is executed with high priority.

How did you try to break this feature and the system with this change?

  • Tested with multiple concurrent copy operations to ensure prioritization works as expected.
  • Confirmed no impact on unrelated features or plugins.

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 30, 2025

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)
Here are some useful points:

@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 16.57%. Comparing base (16c60c7) to head (59d5012).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...rage/datastore/adapter/primera/PrimeraAdapter.java 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
uitests 3.90% <ø> (ø)
unittests 17.47% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@shrikantjoshi-hpe
Copy link
Contributor Author

@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.

@DaanHoogland
Copy link
Contributor

@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.

@shrikantjoshi-hpe
Copy link
Contributor Author

shrikantjoshi-hpe commented Jul 3, 2025

@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.

@DaanHoogland
Copy link
Contributor

@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.
cc @slavkap , @rp- , @harikrishna-patnala this looks simple enough so shouldn’t require much thinking ;)

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@sureshanaparti sureshanaparti requested a review from Copilot July 4, 2025 12:27
Copy link
Contributor

Copilot AI left a 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);


parms.setDestVolume(targetVolumeInfo.getExternalName());
parms.setOnline(false);
parms.setPriority(1);
Copy link

Copilot AI Jul 4, 2025

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.
@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14040

@shrikantjoshi-hpe
Copy link
Contributor Author

@DaanHoogland, code change has been reviewed by a second reviewer as well. Can you now consider it for merging?

Copy link
Contributor

@slavkap slavkap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@shrikantjoshi-hpe
Copy link
Contributor Author

@DaanHoogland, @sureshanaparti, @slavkap Is there anything further required from our side, or can this be considered for merging?

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@DaanHoogland
Copy link
Contributor

@DaanHoogland, @sureshanaparti, @slavkap Is there anything further required from our side, or can this be considered for merging?

@shrikantjoshi-hpe , at this moment there is nothing required/asked from you. We will run regression tests and give people opportunity to add their thoughts, but as this is such a small change I do not expect much more interaction on this PR.

@blueorangutan
Copy link

[SF] Trillian test result (tid-13732)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 59864 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11109-t13732-kvm-ol8.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_extract_Iso Failure 1.13 test_iso.py
test_03_ping_in_ssvm_success Failure 15.51 test_diagnostics.py
test_15_retrieve_ssvm_default_files Failure 2.28 test_diagnostics.py
test_16_retrieve_ssvm_single_file Failure 2.16 test_diagnostics.py
test_17_retrieve_cpvm_default_files Failure 2.17 test_diagnostics.py
test_18_retrieve_cpvm_single_file Failure 2.15 test_diagnostics.py

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13748)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 51709 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11109-t13748-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

low impact and I see no-one testing this beyond regression, merging.

@DaanHoogland DaanHoogland merged commit 4d46bec into apache:main Jul 14, 2025
25 of 26 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 14, 2025

Awesome work, congrats on your first merged pull request!

@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 14, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants