From: Andre Przywara <andre.przywara@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools: allow config file compatibility with new tap syntax
Date: Tue, 9 Jun 2009 11:42:19 +0200 [thread overview]
Message-ID: <4A2E2E7B.1040803@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]
Hi,
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.
This will help our test work flow, because we can use the same config
file for different Xen tools versions.
What is the purpose of the new :tapdisk: specifier? Is it really
redundant (at least currently)?
Please cry out if there is something that I have missed, otherwise
please apply the patch.
If applying this patch is not an option, I would opt for a better error
message.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448 3567 12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: tapdisk_config_file.patch --]
[-- Type: text/x-patch, Size: 833 bytes --]
diff -r aef9bba654f1 tools/python/xen/xend/server/BlktapController.py
--- a/tools/python/xen/xend/server/BlktapController.py Wed Jun 03 00:29:31 2009 +0200
+++ b/tools/python/xen/xend/server/BlktapController.py Mon Jun 08 10:16:33 2009 +0200
@@ -120,8 +120,12 @@
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'):
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2009-06-09 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 9:42 Andre Przywara [this message]
2009-06-09 16:26 ` [PATCH] tools: allow config file compatibility with new tap syntax Dutch Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2E2E7B.1040803@amd.com \
--to=andre.przywara@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.