host.setLastPinged(0); // so that scan task can pick it up
_hostDao.update(host.getId(), host);
// schedule a scan task immediately
if (_agentMgr instanceof ClusteredAgentManagerImpl) {
ClusteredAgentManagerImpl clusteredAgentMgr = (ClusteredAgentManagerImpl) _agentMgr;
if (s_logger.isDebugEnabled()) {
s_logger.debug("Scheduling a host scan task");
}
// schedule host scan task on current MS
clusteredAgentMgr.scheduleHostScanTask();
if (s_logger.isDebugEnabled()) {
s_logger.debug("Notifying all peer MS to schedule host scan task");
}
// notify peers to schedule a host scan task as well
clusteredAgentMgr.notifyNodesInClusterToScheduleHostScanTask();
}
}
}
} catch (Exception e) {
s_logger.warn("Unable to connect due to ", e);