server: fix IllegalMonitorStateException on cluster managedstate change (#11310)

* server: fix IllegalMonitorStateException on cluster managedstate change

Fixes #11293

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-07-29 18:33:05 +05:30 committed by GitHub
parent a32738c52e
commit 4b1a605e59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1217,9 +1217,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
for (int i = 0; i < retry; i++) { for (int i = 0; i < retry; i++) {
lsuccess = true; lsuccess = true;
try { try {
Thread.currentThread().wait(5 * 1000); Thread.sleep(5 * 1000);
} catch (final InterruptedException e) { } catch (final InterruptedException e) {
s_logger.debug("thread unexpectedly interupted during wait, while updating cluster"); s_logger.debug("thread unexpectedly interrupted during wait, while updating cluster");
} }
hosts = listAllUpAndEnabledHosts(Host.Type.Routing, cluster.getId(), cluster.getPodId(), cluster.getDataCenterId()); hosts = listAllUpAndEnabledHosts(Host.Type.Routing, cluster.getId(), cluster.getPodId(), cluster.getDataCenterId());
for (final HostVO host : hosts) { for (final HostVO host : hosts) {