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] xend: allow config file compatibility wit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: allow config file compatibility with new tap syntax
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Jun 2009 06:05:15 -0700
Delivery-date: Tue, 16 Jun 2009 06:05:33 -0700
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 1245146429 -3600
# Node ID 2cbedd22149a80719275bbf5c1a228f64ba38590
# Parent  c23aeb37b17fca00ba8aa39539266efa1b502024
xend: allow config file compatibility with new tap syntax

Recently the format of the tap syntax in the config file changed to
using a 4 part specifier (tap:tapdisk:<format>:<filename>) instead
of the old 3-part one (tap:<qcow>:<filename>).
This breaks compatibility with existing config files: a guest start
will throw a Python exception and will be aborted.
AFAICS currently tap:tapdisk is redundant, so the attached patch
simply catches the above mentioned exception and tries to parse the
old format in this case.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
---
 tools/python/xen/xend/server/BlktapController.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r c23aeb37b17f -r 2cbedd22149a 
tools/python/xen/xend/server/BlktapController.py
--- a/tools/python/xen/xend/server/BlktapController.py  Tue Jun 16 10:58:56 
2009 +0100
+++ b/tools/python/xen/xend/server/BlktapController.py  Tue Jun 16 11:00:29 
2009 +0100
@@ -120,8 +120,12 @@ class BlktapController(BlkifController):
 
     def createDevice(self, config):
 
-        uname = config.get('uname', '')        
-        (typ, subtyp, params, file) = string.split(uname, ':', 3)
+        uname = config.get('uname', '')
+        try:
+            (typ, subtyp, params, file) = string.split(uname, ':', 3)
+        except:
+            (typ, params, file) = string.split(uname, ':', 2)
+            subtyp = 'tapdisk'
         if typ in ('tap'):
             if subtyp in ('tapdisk'):                                          
                 if params in ('ioemu', 'qcow2', 'vmdk', 'sync'):

_______________________________________________
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] xend: allow config file compatibility with new tap syntax, Xen patchbot-unstable <=