mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
add catch-all clause in cluster heartbeat
This commit is contained in:
parent
6544820e74
commit
6ed8b20a76
@ -149,7 +149,9 @@ public class ClusterManagerImpl implements ClusterManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void broadcast(long agentId, Command[] cmds) {
|
public void broadcast(long agentId, Command[] cmds) {
|
||||||
List<ManagementServerHostVO> peers = _mshostDao.getActiveList(new Date());
|
Date cutTime = DateUtil.currentGMTTime();
|
||||||
|
|
||||||
|
List<ManagementServerHostVO> peers = _mshostDao.getActiveList(new Date(cutTime.getTime() - heartbeatThreshold));
|
||||||
for (ManagementServerHostVO peer : peers) {
|
for (ManagementServerHostVO peer : peers) {
|
||||||
String peerName = Long.toString(peer.getMsid());
|
String peerName = Long.toString(peer.getMsid());
|
||||||
if (getSelfPeerName().equals(peerName)) {
|
if (getSelfPeerName().equals(peerName)) {
|
||||||
@ -516,7 +518,7 @@ public class ClusterManagerImpl implements ClusterManager {
|
|||||||
|
|
||||||
_mshostDao.update(_mshostId, DateUtil.currentGMTTime());
|
_mshostDao.update(_mshostId, DateUtil.currentGMTTime());
|
||||||
peerScan();
|
peerScan();
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
s_logger.error("Problem with the cluster heartbeat!", e);
|
s_logger.error("Problem with the cluster heartbeat!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user