mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Bug: HA takes a lot of time to migrate VMs (trigger HA) to another KVM
host if there are multiple storage pools in a cluster. The issue is as follows: 1. When CloudStack detects that a host is not responding to ping requests it'll send a fence command for this host to another host in the cluster. 2. The agent takes a long time to respond to this check if the storage is fenced. This is because the agent checks if the first host is writing to its heartbeat file on all pools in the cluster. It is doing this in a sequential manner on all storage pool. Making a fix to get rid of sleep, wait during HA. The behavior is now similar to Xenserver. RB: https://reviews.apache.org/r/6133/ Send-by:devdeep.singh@citrix.com
This commit is contained in:
parent
3fedd56adb
commit
f497c7c031
@ -53,7 +53,7 @@ public class KVMHAChecker extends KVMHABase implements Callable<Boolean> {
|
||||
cmd.add("-h", _hostIP);
|
||||
cmd.add("-r");
|
||||
cmd.add("-t",
|
||||
String.valueOf((_heartBeatUpdateFreq + _heartBeatUpdateTimeout) / 1000 * 2));
|
||||
String.valueOf(_heartBeatUpdateFreq/1000));
|
||||
OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser();
|
||||
String result = cmd.execute(parser);
|
||||
s_logger.debug("pool: " + pool._poolIp);
|
||||
|
||||
@ -133,14 +133,14 @@ write_hbLog() {
|
||||
}
|
||||
|
||||
check_hbLog() {
|
||||
oldTimeStamp=$(cat $hbFile)
|
||||
sleep $interval &> /dev/null
|
||||
newTimeStamp=$(cat $hbFile)
|
||||
if [ $newTimeStamp -gt $oldTimeStamp ]
|
||||
now=$(date +%s)
|
||||
hb=$(cat $hbFile)
|
||||
diff=`expr $now - $hb`
|
||||
if [ $diff -gt $interval ]
|
||||
then
|
||||
return 0
|
||||
return 1
|
||||
fi
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ "$rflag" == "1" ]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user