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: Add syntax check for block devices

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Add syntax check for block devices
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 May 2008 09:40:22 -0700
Delivery-date: Mon, 12 May 2008 09:41:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1210587549 -3600
# Node ID 0a8fc1a6279647ab625377a35413429d52b5d454
# Parent  0f18d5454c7b6f6a338d16571a064ef5c219c06c
xend: Add syntax check for block devices

If we define wrong values to a disk parameter in domain configuration
files, we get an error message or a guest OS panic.

 1. If we define a wrong disk type, xm create command error occurs
    about 100 seconds later.
      e.g.  disk=['xyz:/xen/root-vm1.img,hda1,w']

 2. If we forget a disk type, a guest OS panic occurs.
      e.g.  disk=['/xen/root-vm1.img,hda1,w']

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/blkif.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 0f18d5454c7b -r 0a8fc1a62796 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Mon May 12 11:16:43 2008 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Mon May 12 11:19:09 2008 +0100
@@ -56,8 +56,12 @@ class BlkifController(DevController):
         else:
             try:
                 (typ, params) = string.split(uname, ':', 1)
+                if typ not in ('phy', 'file'):
+                    raise VmError(
+                        'Block device must have "phy" or "file" specified to 
type')
             except ValueError:
-                (typ, params) = ("", "")
+                raise VmError(
+                    'Block device must have physical details specified')
 
         mode = config.get('mode', 'r')
         if mode not in ('r', 'w', 'w!'):

_______________________________________________
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: Add syntax check for block devices, Xen patchbot-unstable <=