ia64/xen-unstable
changeset 19744:2cbedd22149a
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@amd.com>
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@amd.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Jun 16 11:00:29 2009 +0100 (2009-06-16) |
parents | c23aeb37b17f |
children | 55ca7ef865b4 |
files | tools/python/xen/xend/server/BlktapController.py |
line diff
1.1 --- a/tools/python/xen/xend/server/BlktapController.py Tue Jun 16 10:58:56 2009 +0100 1.2 +++ b/tools/python/xen/xend/server/BlktapController.py Tue Jun 16 11:00:29 2009 +0100 1.3 @@ -120,8 +120,12 @@ class BlktapController(BlkifController): 1.4 1.5 def createDevice(self, config): 1.6 1.7 - uname = config.get('uname', '') 1.8 - (typ, subtyp, params, file) = string.split(uname, ':', 3) 1.9 + uname = config.get('uname', '') 1.10 + try: 1.11 + (typ, subtyp, params, file) = string.split(uname, ':', 3) 1.12 + except: 1.13 + (typ, params, file) = string.split(uname, ':', 2) 1.14 + subtyp = 'tapdisk' 1.15 if typ in ('tap'): 1.16 if subtyp in ('tapdisk'): 1.17 if params in ('ioemu', 'qcow2', 'vmdk', 'sync'):