CS-15646: HA takes long time to migrate VMs to another KVM host if there are multiple storage pools.

Getting rid of the sleep, wait suring HA. This is a similar behavior to Xenserver. Changes by Edison.

Reviewed-By: Devdeep
This commit is contained in:
Devdeep Singh 2012-07-21 22:59:47 +05:30
parent 49199d0022
commit 08bd7c31b4
2 changed files with 7 additions and 7 deletions

View File

@ -49,7 +49,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);

View File

@ -130,14 +130,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" ]