Skip to content

Commit 6766c01

Browse files
committed
CLOUDSTACK-3535: still maintain stop agent wont trigger HA
1 parent bdd6213 commit 6766c01

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎client/tomcatconf/nonossComponentContext.xml.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
<ref bean="VmwareInvestigator"/>
272272
<ref bean="UserVmDomRInvestigator"/>
273273
<ref bean="ManagementIPSystemVMInvestigator"/>
274+
<ref bean="KVMInvestigator"/>
274275
</list>
275276
</property>
276277
</bean>

‎plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
import com.cloud.vm.VMInstanceVO;
3232
import org.apache.log4j.Logger;
3333

34+
import javax.ejb.Local;
3435
import javax.inject.Inject;
3536
import java.util.List;
3637

38+
@Local(value=Investigator.class)
3739
public class KVMInvestigator extends AdapterBase implements Investigator {
3840
private final static Logger s_logger = Logger.getLogger(KVMInvestigator.class);
3941
@Inject

‎server/src/com/cloud/agent/manager/AgentManagerImpl.java‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,11 +850,7 @@ protected boolean handleDisconnectWithoutInvestigation(AgentAttache attache, Sta
850850
s_logger.debug("Deregistering link for " + hostId + " with state " + nextStatus);
851851
}
852852

853-
//For KVM, if removeagent is false, don't remove the agent in agentmap, pingtimeout will pick it up.
854-
if (host.getHypervisorType() != HypervisorType.KVM || removeAgent) {
855-
removeAgent(attache, nextStatus);
856-
}
857-
853+
removeAgent(attache, nextStatus);
858854
//update the DB
859855
if (host != null && transitState) {
860856
disconnectAgent(host, event, _nodeId);

0 commit comments

Comments
 (0)