mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
This commit is contained in:
parent
5d5ac17c68
commit
d32065fd38
@ -1052,12 +1052,24 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_mshostId != null) {
|
if (_mshostId != null) {
|
||||||
final ManagementServerHostVO mshost = _mshostDao.findByMsid(_msId);
|
ManagementServerHostVO mshost = _mshostDao.findByMsid(_msId);
|
||||||
final ManagementServerStatusVO mshostStatus = mshostStatusDao.findByMsId(mshost.getUuid());
|
if (mshost != null) {
|
||||||
mshost.setState(ManagementServerHost.State.Down);
|
ManagementServerStatusVO mshostStatus = mshostStatusDao.findByMsId(mshost.getUuid());
|
||||||
mshostStatus.setLastJvmStop(new Date());
|
if (mshostStatus != null) {
|
||||||
_mshostDao.update(_mshostId, mshost);
|
mshost.setState(ManagementServerHost.State.Down);
|
||||||
mshostStatusDao.update(mshostStatus.getId(), mshostStatus);
|
mshostStatus.setLastJvmStop(new Date());
|
||||||
|
_mshostDao.update(_mshostId, mshost);
|
||||||
|
mshostStatusDao.update(mshostStatus.getId(), mshostStatus);
|
||||||
|
} else {
|
||||||
|
s_logger.warn(String.format("Found a management server host [%s] without a status. This should never happen!", mshost));
|
||||||
|
mshostStatus = new ManagementServerStatusVO();
|
||||||
|
mshostStatus.setMsId(mshost.getUuid());
|
||||||
|
mshostStatus.setLastSystemBoot(new Date());
|
||||||
|
mshostStatus.setLastJvmStart(new Date());
|
||||||
|
mshostStatus.setUpdated(new Date());
|
||||||
|
mshostStatusDao.persist(mshostStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_heartbeatScheduler.shutdownNow();
|
_heartbeatScheduler.shutdownNow();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user