CLOUDSTACK-3535: still maintain stop agent wont trigger HA

This commit is contained in:
Edison Su 2013-08-07 14:41:36 -07:00
parent 7d5e4c666b
commit e115ee4026
3 changed files with 4 additions and 5 deletions

View File

@ -271,6 +271,7 @@
<ref bean="VmwareInvestigator"/>
<ref bean="UserVmDomRInvestigator"/>
<ref bean="ManagementIPSystemVMInvestigator"/>
<ref bean="KVMInvestigator"/>
</list>
</property>
</bean>

View File

@ -30,9 +30,11 @@ import com.cloud.resource.ResourceManager;
import com.cloud.utils.component.AdapterBase;
import org.apache.log4j.Logger;
import javax.ejb.Local;
import javax.inject.Inject;
import java.util.List;
@Local(value=Investigator.class)
public class KVMInvestigator extends AdapterBase implements Investigator {
private final static Logger s_logger = Logger.getLogger(KVMInvestigator.class);
@Inject

View File

@ -779,11 +779,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
s_logger.debug("Deregistering link for " + hostId + " with state " + nextStatus);
}
//For KVM, if removeagent is false, don't remove the agent in agentmap, pingtimeout will pick it up.
if (host.getHypervisorType() != HypervisorType.KVM || removeAgent) {
removeAgent(attache, nextStatus);
}
removeAgent(attache, nextStatus);
//update the DB
if (host != null && transitState) {
disconnectAgent(host, event, _nodeId);