mirror of https://github.com/apache/cloudstack.git
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
dd6972ee07
commit
931dcff710
|
|
@ -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…
Reference in New Issue