Skip to content

Comments

Fix primary storage maintenance on xcpng#12694

Open
abh1sar wants to merge 1 commit intoapache:4.20from
shapeblue:xcpng-maintenance
Open

Fix primary storage maintenance on xcpng#12694
abh1sar wants to merge 1 commit intoapache:4.20from
shapeblue:xcpng-maintenance

Conversation

@abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Feb 24, 2026

Description

Enable maintenance mode is erroring out on XCP-ng

Screenshot 2026-02-24 at 10 47 04 AM
2026-02-24 04:44:49,881 ERROR [c.c.s.StoragePoolAutomationImpl] (API-Job-Executor-7:[ctx-b02dbbf9, job-515, ctx-8a343d55]) (logid:4e4cc86b) Exception in enabling primary storage maintenance: java.lang.ClassCastException: class com.cloud.agent.api.Answer cannot be cast to class com.cloud.agent.api.ModifyStoragePoolAnswer (com.cloud.agent.api.Answer and com.cloud.agent.api.ModifyStoragePoolAnswer are in unnamed module of loader 'app')
        at com.cloud.storage.StoragePoolAutomationImpl.removeHeartbeatForHostsFromPool(StoragePoolAutomationImpl.java:255)
        at com.cloud.storage.StoragePoolAutomationImpl.maintain(StoragePoolAutomationImpl.java:86)
        at org.apache.cloudstack.storage.datastore.lifecycle.CloudStackPrimaryDataStoreLifeCycleImpl.maintain(CloudStackPrimaryDataStoreLifeCycleImpl.java:444)

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?

  1. Add a NFS primary storage
  2. Put it in maintenance (Throws error without the fix)
  3. Delete the primary storage

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

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.25%. Comparing base (c748b69) to head (c52ee41).

Files with missing lines Patch % Lines
...xenbase/CitrixModifyStoragePoolCommandWrapper.java 16.66% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12694      +/-   ##
============================================
- Coverage     16.25%   16.25%   -0.01%     
  Complexity    13425    13425              
============================================
  Files          5662     5662              
  Lines        500155   500157       +2     
  Branches      60738    60738              
============================================
- Hits          81319    81313       -6     
- Misses       409749   409759      +10     
+ Partials       9087     9085       -2     
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests 17.11% <37.50%> (-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.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Feb 24, 2026

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

DaanHoogland commented Feb 24, 2026

@blueorangutan test ol9 xcpng84

@blueorangutan
Copy link

@DaanHoogland [SL] unsupported parameters provided. Supported mgmt server os are: suse15, alma10, ol10, rocky10, alma9, centos7, centos6, rocky9, alma8, ubuntu18, ol9, ol8, ubuntu22, debian12, ubuntu20, rocky8, ubuntu24. Supported hypervisors are: kvm-centos6, kvm-centos7, kvm-rocky8, kvm-rocky9, kvm-rocky10, kvm-ol8, kvm-ol9, kvm-ol10, kvm-alma8, kvm-alma9, kvm-alma10, kvm-ubuntu18, kvm-ubuntu20, kvm-ubuntu22, kvm-ubuntu24, kvm-debian12, kvm-suse15, vmware-55u3, vmware-60u2, vmware-65u2, vmware-67u3, vmware-70u1, vmware-70u2, vmware-70u3, vmware-80, vmware-80u1, vmware-80u2, vmware-80u3, vmware-80u3e, xenserver-65sp1, xenserver-71, xenserver-74, xenserver-84, xcpng74, xcpng76, xcpng80, xcpng81, xcpng82, xcpng83

@DaanHoogland
Copy link
Contributor

@blueorangutan test ol9 xcpng83

@blueorangutan
Copy link

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

@apache apache deleted a comment from blueorangutan Feb 24, 2026
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.

3 participants