Skip to content

Commit 6bcb459

Browse files
committed
KVM: remove KVMHABase.s_heartBeatPath
1 parent 67d9c8f commit 6bcb459

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/KVMHABase.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
public class KVMHABase {
3636
protected Logger logger = LogManager.getLogger(getClass());
3737
private long _timeout = 60000; /* 1 minutes */
38-
protected static String s_heartBeatPath;
3938
protected long _heartBeatUpdateTimeout = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.HEARTBEAT_UPDATE_TIMEOUT);
4039
protected long _heartBeatUpdateFreq = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.KVM_HEARTBEAT_UPDATE_FREQUENCY);
4140
protected long _heartBeatUpdateMaxTries = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.KVM_HEARTBEAT_UPDATE_MAX_TRIES);

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,15 @@ public class KVMHAMonitor extends KVMHABase implements Runnable {
3939

4040
private final String hostPrivateIp;
4141

42-
public KVMHAMonitor(HAStoragePool pool, String host, String scriptPath) {
42+
public KVMHAMonitor(HAStoragePool pool, String host) {
4343
if (pool != null) {
4444
storagePool.put(pool.getPoolUUID(), pool);
4545
}
4646
hostPrivateIp = host;
47-
configureHeartBeatPath(scriptPath);
4847

4948
rebootHostAndAlertManagementOnHeartbeatTimeout = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.REBOOT_HOST_AND_ALERT_MANAGEMENT_ON_HEARTBEAT_TIMEOUT);
5049
}
5150

52-
private static synchronized void configureHeartBeatPath(String scriptPath) {
53-
KVMHABase.s_heartBeatPath = scriptPath;
54-
}
55-
5651
public void addStoragePool(HAStoragePool pool) {
5752
synchronized (storagePool) {
5853
storagePool.put(pool.getPoolUUID(), pool);

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,11 +1063,6 @@ public boolean configure(final String name, final Map<String, Object> params) th
10631063
throw new ConfigurationException("Unable to find patch.sh");
10641064
}
10651065

1066-
heartBeatPath = Script.findScript(kvmScriptsDir, "kvmheartbeat.sh");
1067-
if (heartBeatPath == null) {
1068-
throw new ConfigurationException("Unable to find kvmheartbeat.sh");
1069-
}
1070-
10711066
createVmPath = Script.findScript(storageScriptsDir, "createvm.sh");
10721067
if (createVmPath == null) {
10731068
throw new ConfigurationException("Unable to find the createvm.sh");
@@ -1330,7 +1325,7 @@ public boolean configure(final String name, final Map<String, Object> params) th
13301325

13311326
final String[] info = NetUtils.getNetworkParams(privateNic);
13321327

1333-
kvmhaMonitor = new KVMHAMonitor(null, info[0], heartBeatPath);
1328+
kvmhaMonitor = new KVMHAMonitor(null, info[0]);
13341329
final Thread ha = new Thread(kvmhaMonitor);
13351330
ha.start();
13361331

0 commit comments

Comments
 (0)