diff --git a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java index 105a82deb27..918476cbac6 100755 --- a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -438,20 +438,22 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl protected Status investigate(AgentAttache agent) { Long hostId = agent.getId(); - if (s_logger.isDebugEnabled()) { - s_logger.debug("checking if agent (" + hostId + ") is alive"); - } - - Answer answer = easySend(hostId, new CheckHealthCommand()); - if (answer != null && answer.getResult()) { - Status status = Status.Up; + HostVO host = _hostDao.findById(hostId); + if (host != null && host.getType() != null && !host.getType().isVirtual()) { if (s_logger.isDebugEnabled()) { - s_logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is " + status); + s_logger.debug("checking if agent (" + hostId + ") is alive"); } - return status; + Answer answer = easySend(hostId, new CheckHealthCommand()); + if (answer != null && answer.getResult()) { + Status status = Status.Up; + if (s_logger.isDebugEnabled()) { + s_logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is " + status); + } + return status; + } + return _haMgr.investigate(hostId); } - - return _haMgr.investigate(hostId); + return Status.Alert; } protected AgentAttache getAttache(final Long hostId) throws AgentUnavailableException {