Skip to content

Fix: API Thread held forever during force deleting across MS#12968

Open
nvazquez wants to merge 2 commits intoapache:4.22from
shapeblue:422-fix-thread-held-forever-force-delete
Open

Fix: API Thread held forever during force deleting across MS#12968
nvazquez wants to merge 2 commits intoapache:4.22from
shapeblue:422-fix-thread-held-forever-force-delete

Conversation

@nvazquez
Copy link
Copy Markdown
Contributor

@nvazquez nvazquez commented Apr 6, 2026

Description

This PR fixes indefinite hang on deleteHost operation for multiple management server environments. In a multi-management-server (clustered) environment, a forced deleteHost API call causes the calling MS to hang indefinitely, eventually exhausting API threads and rendering the entire environment unresponsive (502 gateway errors).

Fixed by adding:

  • Propagate isForced and isForceDeleteStorage flags across management servers via PropagateResourceEventCommand
  • Catch RuntimeException in ClusterDispatcher.dispatch() so that unexpected failures return a proper error response instead of silently hanging

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?

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Apr 6, 2026

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 14.28571% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.60%. Comparing base (4708121) to head (64e346e).

Files with missing lines Patch % Lines
...cloud/agent/api/PropagateResourceEventCommand.java 0.00% 12 Missing ⚠️
...cloud/agent/manager/ClusteredAgentManagerImpl.java 0.00% 9 Missing ⚠️
...n/java/com/cloud/resource/ResourceManagerImpl.java 35.71% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12968      +/-   ##
============================================
- Coverage     17.60%   17.60%   -0.01%     
- Complexity    15677    15678       +1     
============================================
  Files          5918     5918              
  Lines        531681   531711      +30     
  Branches      65005    65008       +3     
============================================
- Hits          93623    93622       -1     
- Misses       427498   427526      +28     
- Partials      10560    10563       +3     
Flag Coverage Δ
uitests 3.70% <ø> (ø)
unittests 18.67% <14.28%> (-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
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17371

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Apr 6, 2026

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@nvazquez 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
Copy Markdown

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

@nvazquez
Copy link
Copy Markdown
Contributor Author

nvazquez commented Apr 6, 2026

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

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