mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Bug 14551: add top-level catch clause to protect task/thread from stalling
Reviewed-By: Kelven
This commit is contained in:
parent
608cbd266f
commit
c12b00099b
@ -693,16 +693,19 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
||||
|
||||
@Override
|
||||
public synchronized void run() {
|
||||
if (!cancelled) {
|
||||
startRebalanceAgents();
|
||||
if (s_logger.isInfoEnabled()) {
|
||||
s_logger.info("The agent load balancer task is now being cancelled");
|
||||
}
|
||||
cancelled = true;
|
||||
}
|
||||
try {
|
||||
if (!cancelled) {
|
||||
startRebalanceAgents();
|
||||
if (s_logger.isInfoEnabled()) {
|
||||
s_logger.info("The agent load balancer task is now being cancelled");
|
||||
}
|
||||
cancelled = true;
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
s_logger.error("Unexpected exception " + e.toString(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void startRebalanceAgents() {
|
||||
s_logger.debug("Management server " + _nodeId + " is asking other peers to rebalance their agents");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user