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-devel

[Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remus: support both tap and tap2 style disk specs
From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Date: Wed, 16 Feb 2011 22:08:49 -0800
Delivery-date: Wed, 16 Feb 2011 22:09:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1297922415 28800
# Node ID 0ee537d24ca0fb0e5e74438f1375a7a7d9dc13b5
# Parent  137ad33475048abce15d82a7499cf211f0c28c85
Remus: support both tap and tap2 style disk specs

Signed-off-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>

diff -r 137ad3347504 -r 0ee537d24ca0 tools/python/xen/remus/device.py
--- a/tools/python/xen/remus/device.py  Mon Feb 14 17:02:55 2011 +0000
+++ b/tools/python/xen/remus/device.py  Wed Feb 16 22:00:15 2011 -0800
@@ -36,10 +36,11 @@
         # to request commits.
         self.ctlfd = None
 
-        if not disk.uname.startswith('tap:remus:') and not 
disk.uname.startswith('tap:tapdisk:remus:'):
+        disktype = re.match("tap2?:.*(remus.*)\|", disk.uname)
+        if disktype == None:
             raise ReplicatedDiskException('Disk is not replicated: %s' %
                                         str(disk))
-        fifo = re.match("tap:.*(remus.*)\|", disk.uname).group(1).replace(':', 
'_')
+        fifo = disktype.group(1).replace(':', '_')
         absfifo = os.path.join(self.FIFODIR, fifo)
         absmsgfifo = absfifo + '.msg'
 

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