Skip to content

Conversation

weizhouapache
Copy link
Member

Description

This PR may fix #11764

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):

How Has This Been Tested?

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

@weizhouapache
Copy link
Member Author

@blueorangutan package

@weizhouapache weizhouapache added this to the 4.20.2 milestone Oct 1, 2025
@blueorangutan
Copy link

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

Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (c631d6a) to head (aa725cb).
⚠️ Report is 9 commits behind head on 4.20.

Files with missing lines Patch % Lines
...ain/java/com/cloud/storage/StorageManagerImpl.java 0.00% 4 Missing ⚠️
...cycle/CloudStackPrimaryDataStoreLifeCycleImpl.java 0.00% 1 Missing ⚠️
...a/com/cloud/storage/StoragePoolAutomationImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #11773      +/-   ##
============================================
- Coverage     16.17%   16.17%   -0.01%     
+ Complexity    13298    13295       -3     
============================================
  Files          5656     5656              
  Lines        498242   498271      +29     
  Branches      60458    60466       +8     
============================================
- Hits          80584    80583       -1     
- Misses       408686   408719      +33     
+ Partials       8972     8969       -3     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.02% <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.

@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

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

@weizhouapache weizhouapache linked an issue Oct 2, 2025 that may be closed by this pull request
@blueorangutan
Copy link

[SF] Trillian test result (tid-14507)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53287 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11773-t14507-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

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.

I can not see whether this would fix the issue. It probably would and testing must show. But in general the cancel maintenance method is 130 lines and three phases, two of which should be structured and modularised more to be easier to read and control, what they do.

@weizhouapache
Copy link
Member Author

I can not see whether this would fix the issue. It probably would and testing must show.

yes, this needs testing.
actually in the life cycle of other storage pool, the logic is the same, which I think makes sense:

         dataStoreHelper.cancelMaintain(store);
         storagePoolAutmation.cancelMaintain(store);

except CloudStackPrimaryDataStoreLifeCycleImpl, I have no idea why

But in general the cancel maintenance method is 130 lines and three phases, two of which should be structured and modularised more to be easier to read and control, what they do.

+1, please go ahead with the refactoring

@DaanHoogland
Copy link
Contributor

+1, please go ahead with the refactoring

will do, but if not on this branch it will be conflicts.

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 and tested in a lab env

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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 15300

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15301

@weizhouapache
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache 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-14542)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53635 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11773-t14542-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

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm. didn't test.

@DaanHoogland
Copy link
Contributor

+1, please go ahead with the refactoring

#11789

@DaanHoogland
Copy link
Contributor

yes, this needs testing.

tested in for VMs and systemVMs. VMs are just stopped and restarted when the pool is back.

I will test some more with VM-HA.

@DaanHoogland
Copy link
Contributor

A remaining issue is that VMs with HA-offerings are stopped as well during bringing into maintenance. these are started again after canceling maintenance.
VRs have their volumes migrated so the same should happen for HA-VMs.

@DaanHoogland
Copy link
Contributor

A remaining issue is that VMs with HA-offerings are stopped as well during bringing into maintenance. these are started again after canceling maintenance. VRs have their volumes migrated so the same should happen for HA-VMs.

this is not an issue with this PR. I think we are good to go.

@weizhouapache
Copy link
Member Author

@slavkap
do you have time to test this ?

@slavkap
Copy link
Contributor

slavkap commented Oct 7, 2025

@weizhouapache, yes, I will test it tomorrow


private void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer) {
@Override
public void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@weizhouapache, is it possible to add the condition if the pool is StorPool to not set the capacity/used bytes? We have a custom ModifyStorageCommand and this one returns wrong values for us. The correct ones will be applied when the storage stats are collected and meanwhile this could cause issues for the StorPool users

Copy link
Member Author

Choose a reason for hiding this comment

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

@slavkap
pushed a commit to skip capacity update on storpool
hope there are no regressions

Copy link
Contributor

Choose a reason for hiding this comment

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

thank you @weizhouapache, I hope so too. I'll test it in a bit

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15339

@weizhouapache
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot cancle maintenance mode of a primary storage v4.21
5 participants