debuggers.hg

diff tools/libxc/xc_domain_restore.c @ 20983:a948403c8f99

Remus: increase failover timeout from 500ms to 1s

500ms is aggressive enough to trigger split-brain under fairly
ordinary workloads, particularly for HVM. The long-term fix is to
integrate with a real HA monitor like linux HA.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Feb 12 09:23:10 2010 +0000 (2010-02-12)
parents fbe8f32fa257
children 779c0ef9682c
line diff
     1.1 --- a/tools/libxc/xc_domain_restore.c	Fri Feb 12 09:21:57 2010 +0000
     1.2 +++ b/tools/libxc/xc_domain_restore.c	Fri Feb 12 09:23:10 2010 +0000
     1.3 @@ -444,7 +444,7 @@ alloc_page:
     1.4  /* set when a consistent image is available */
     1.5  static int completed = 0;
     1.6  
     1.7 -#define HEARTBEAT_MS 500
     1.8 +#define HEARTBEAT_MS 1000
     1.9  
    1.10  #ifndef __MINIOS__
    1.11  static ssize_t read_exact_timed(int fd, void* buf, size_t size)
    1.12 @@ -458,8 +458,8 @@ static ssize_t read_exact_timed(int fd, 
    1.13      {
    1.14          if ( completed ) {
    1.15              /* expect a heartbeat every HEARBEAT_MS ms maximum */
    1.16 -            tv.tv_sec = 0;
    1.17 -            tv.tv_usec = HEARTBEAT_MS * 1000;
    1.18 +            tv.tv_sec = HEARTBEAT_MS / 1000;
    1.19 +            tv.tv_usec = (HEARTBEAT_MS % 1000) * 1000;
    1.20  
    1.21              FD_ZERO(&rfds);
    1.22              FD_SET(fd, &rfds);