Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Jul 28, 2025

Description

Fixes #11293

The change was introduced in #10518
Thread.currentThread().wait(...) must be called in a synchronized block and on the object.

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?

@shwstppr shwstppr changed the base branch from main to 4.19 July 28, 2025 12:01
@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.28%. Comparing base (6e19c07) to head (f26aec2).
⚠️ Report is 31 commits behind head on 4.19.

❗ There is a different number of reports uploaded between BASE (6e19c07) and HEAD (f26aec2). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (6e19c07) HEAD (f26aec2)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               4.19   #11310       +/-   ##
=============================================
- Coverage     15.17%    4.28%   -10.89%     
=============================================
  Files          5416      372     -5044     
  Lines        475621    29738   -445883     
  Branches      58054     5227    -52827     
=============================================
- Hits          72168     1274    -70894     
+ Misses       395380    28319   -367061     
+ Partials       8073      145     -7928     
Flag Coverage Δ
uitests 4.28% <ø> (+<0.01%) ⬆️
unittests ?

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

@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

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 fixes an IllegalMonitorStateException that occurs when updating cluster managed state by replacing an incorrect wait() call with sleep().

  • Replace Thread.currentThread().wait() with Thread.sleep() to fix synchronization issue
  • Correct improper use of wait() method outside synchronized block

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.

A wait should have been on the cluster, my bad. But I think a sleep is very appropriate here.

@kiranchavala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@kiranchavala 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 14434

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM, able to manage and unmage cluster successfully without any issues

@sureshanaparti sureshanaparti merged commit 4b1a605 into apache:4.19 Jul 29, 2025
24 checks passed
Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland DaanHoogland deleted the fix-clustermanagedstatechange branch July 29, 2025 13:05
@DaanHoogland DaanHoogland added this to the 4.19.4 milestone Jul 29, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
…ge (apache#11310)

* server: fix IllegalMonitorStateException on cluster managedstate change

Fixes apache#11293

* Update server/src/main/java/com/cloud/resource/ResourceManagerImpl.java

Signed-off-by: Abhishek Kumar <[email protected]>
Co-authored-by: Suresh Kumar Anaparti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting NPE when unmange cluster is performed

6 participants