mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
e966818264
commit
51e4a7555d
1 file changed
+6
-2
@@ -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'):
|
||||
|
||||