mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10628: if private network and storage network use the same nic, MS will start HA very quickly within 20 seconds, it breaks heartbeat check, which require 60 seconds interval. add 60s sleep before trying to HA on VMs
status 10628: resolved fixed
This commit is contained in:
parent
9b640085ab
commit
b885915f1e
@ -185,6 +185,19 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager, Clu
|
||||
if (host.getType() != Host.Type.Routing) {
|
||||
return;
|
||||
}
|
||||
// need to wait 60 seconds to make sure storage heartbeat check correct
|
||||
long begin = System.currentTimeMillis();
|
||||
while ( true ) {
|
||||
try {
|
||||
Thread.sleep(60*1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
long now = System.currentTimeMillis();
|
||||
if( (now - begin) > 60*1000) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s_logger.warn("Scheduling restart for VMs on host " + host.getId());
|
||||
|
||||
final List<VMInstanceVO> vms = _instanceDao.listByHostId(host.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user