mirror of https://github.com/apache/cloudstack.git
bug 8249 : save combined persistent and run-time id into worker to help worker VM GC
This commit is contained in:
parent
0131edd628
commit
fd27af5d8f
|
|
@ -42,7 +42,8 @@ public interface ClusterManager extends Manager {
|
|||
public Boolean propagateAgentEvent(long agentId, Event event) throws AgentUnavailableException;
|
||||
|
||||
public int getHeartbeatThreshold();
|
||||
public long getId();
|
||||
public long getId();
|
||||
public long getCurrentRunId();
|
||||
public String getSelfPeerName();
|
||||
public String getSelfNodeIP();
|
||||
public String getPeerName(long agentHostId);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import javax.naming.ConfigurationException;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.AgentManager.OnError;
|
||||
import com.cloud.agent.Listener;
|
||||
import com.cloud.agent.AgentManager.OnError;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.ChangeAgentCommand;
|
||||
import com.cloud.agent.api.Command;
|
||||
|
|
@ -81,6 +81,7 @@ public class ClusterManagerImpl implements ClusterManager {
|
|||
private HostDao _hostDao;
|
||||
|
||||
protected long _id = MacAddress.getMacAddress().toLong();
|
||||
protected long _runId = System.currentTimeMillis();
|
||||
|
||||
private Long _mshostId = null;
|
||||
|
||||
|
|
@ -775,6 +776,11 @@ public class ClusterManagerImpl implements ClusterManager {
|
|||
return _id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCurrentRunId() {
|
||||
return _runId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeartbeatThreshold() {
|
||||
return this.heartbeatThreshold;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ import com.cloud.utils.net.MacAddress;
|
|||
public class DummyClusterManagerImpl implements ClusterManager {
|
||||
private static final Logger s_logger = Logger.getLogger(DummyClusterManagerImpl.class);
|
||||
|
||||
protected long _id = MacAddress.getMacAddress().toLong();
|
||||
protected long _id = MacAddress.getMacAddress().toLong();
|
||||
protected long _runId = System.currentTimeMillis();
|
||||
|
||||
private String _name;
|
||||
private final String _clusterNodeIP = "127.0.0.1";
|
||||
|
||||
|
|
@ -81,7 +83,11 @@ public class DummyClusterManagerImpl implements ClusterManager {
|
|||
|
||||
public long getId() {
|
||||
return _id;
|
||||
}
|
||||
}
|
||||
|
||||
public long getCurrentRunId() {
|
||||
return _runId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagementServerHostVO getPeer(String str) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue