WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Remus: increase failover timeout from 500

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Remus: increase failover timeout from 500ms to 1s
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Feb 2010 01:35:18 -0800
Delivery-date: Fri, 12 Feb 2010 01:35:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265966590 0
# Node ID a948403c8f99013cd7bfd5c441e84c41a0e4009e
# Parent  a4ddf47a1e912d18f982fded29539a69e9ac1b0c
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@xxxxxxxxx>
---
 tools/blktap2/drivers/block-remus.c |   10 +++++-----
 tools/libxc/xc_domain_restore.c     |    6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff -r a4ddf47a1e91 -r a948403c8f99 tools/blktap2/drivers/block-remus.c
--- a/tools/blktap2/drivers/block-remus.c       Fri Feb 12 09:21:57 2010 +0000
+++ b/tools/blktap2/drivers/block-remus.c       Fri Feb 12 09:23:10 2010 +0000
@@ -59,7 +59,7 @@
 #include <unistd.h>
 
 /* timeout for reads and writes in ms */
-#define NET_TIMEOUT 500
+#define HEARTBEAT_MS 1000
 #define RAMDISK_HASHSIZE 128
 
 /* connect retry timeout (seconds) */
@@ -604,8 +604,8 @@ static int mread(int fd, void* buf, size
        int rc;
        size_t cur = 0;
        struct timeval tv = {
-               .tv_sec = 0,
-               .tv_usec = NET_TIMEOUT * 1000
+               .tv_sec = HEARTBEAT_MS / 1000,
+               .tv_usec = (HEARTBEAT_MS % 1000) * 1000
        };
 
        if (!len)
@@ -649,8 +649,8 @@ static int mwrite(int fd, void* buf, siz
        size_t cur = 0;
        int rc;
        struct timeval tv = {
-               .tv_sec = 0,
-               .tv_usec = NET_TIMEOUT * 1000
+               .tv_sec = HEARTBEAT_MS / 1000,
+               .tv_usec = (HEARTBEAT_MS % 1000) * 1000
        };
 
        if (!len)
diff -r a4ddf47a1e91 -r a948403c8f99 tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Fri Feb 12 09:21:57 2010 +0000
+++ b/tools/libxc/xc_domain_restore.c   Fri Feb 12 09:23:10 2010 +0000
@@ -444,7 +444,7 @@ alloc_page:
 /* set when a consistent image is available */
 static int completed = 0;
 
-#define HEARTBEAT_MS 500
+#define HEARTBEAT_MS 1000
 
 #ifndef __MINIOS__
 static ssize_t read_exact_timed(int fd, void* buf, size_t size)
@@ -458,8 +458,8 @@ static ssize_t read_exact_timed(int fd, 
     {
         if ( completed ) {
             /* expect a heartbeat every HEARBEAT_MS ms maximum */
-            tv.tv_sec = 0;
-            tv.tv_usec = HEARTBEAT_MS * 1000;
+            tv.tv_sec = HEARTBEAT_MS / 1000;
+            tv.tv_usec = (HEARTBEAT_MS % 1000) * 1000;
 
             FD_ZERO(&rfds);
             FD_SET(fd, &rfds);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Remus: increase failover timeout from 500ms to 1s, Xen patchbot-unstable <=