[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xend: allow config file compatibility with new tap syntax
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |