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] tools/xend: drbd: fix things by reverting

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/xend: drbd: fix things by reverting 20158
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Jan 2011 06:45:20 -0800
Delivery-date: Thu, 06 Jan 2011 06:46:53 -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 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1294270284 0
# Node ID e0db3784a4a234f99ef417f4cd9377010a8d127a
# Parent  180ad8c642ab828ef01fbb82d5f8c416ba725619
tools/xend: drbd: fix things by reverting 20158

drbd's block-drbd script handles all of the details that c/s 20158
introduces within xend :-(.  This c/s should be reverted as it causes
a regression.  Jim Fehlig tested drbd without 20158 and it works fine.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Tested-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
---
 tools/python/xen/util/blkif.py          |    9 +--------
 tools/python/xen/xend/XendDomainInfo.py |   10 ----------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff -r 180ad8c642ab -r e0db3784a4a2 tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py    Wed Jan 05 23:13:07 2011 +0000
+++ b/tools/python/xen/util/blkif.py    Wed Jan 05 23:31:24 2011 +0000
@@ -71,15 +71,8 @@ def _parse_uname(uname):
     if uname.find(":") != -1:
         (typ, fn) = uname.split(":", 1)
 
-        if typ == "phy" and not fn.startswith("/"):
+        if typ in ("phy", "drbd") and not fn.startswith("/"):
             fn = "/dev/%s" %(fn,)
-
-        if typ == "drbd":
-            if not fn.startswith("drbd"):
-                (drbdadmstdin, drbdadmstdout) = os.popen2(["/sbin/drbdadm", 
"sh-dev", fn])
-                fn = drbdadmstdout.readline().strip()
-            else:
-                fn = "/dev/%s" %(fn,)
                
         if typ in ("tap", "tap2"):
             (taptype, fn) = fn.split(":", 1)
diff -r 180ad8c642ab -r e0db3784a4a2 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Jan 05 23:13:07 2011 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Jan 05 23:31:24 2011 +0000
@@ -3249,16 +3249,6 @@ class XendDomainInfo:
             disk = devinfo[1]['uname']
 
             fn = blkdev_uname_to_file(disk)
-
-            # If this is a drbd volume, check if we need to activate it
-            if disk.find(":") != -1:
-                (disktype, diskname) = disk.split(':', 1)
-                if disktype == 'drbd':
-                    (drbdadmstdin, drbdadmstdout) = 
os.popen2(["/sbin/drbdadm", "state", diskname])
-                    (state, junk) = drbdadmstdout.readline().split('/', 1)
-                    if state == 'Secondary':
-                        os.system('/sbin/drbdadm primary ' + diskname)
-
             taptype = blkdev_uname_to_taptype(disk)
             mounted = devtype in ['tap', 'tap2'] and taptype != 'aio' and 
taptype != 'sync' and not os.stat(fn).st_rdev
             mounted_vbd_uuid = 0

_______________________________________________
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] tools/xend: drbd: fix things by reverting 20158, Xen patchbot-unstable <=