* [PATCH] Add syntax check for block devices
@ 2008-05-12 10:15 Masaki Kanno
2008-05-13 10:33 ` Yosuke Iwamatsu
0 siblings, 1 reply; 3+ messages in thread
From: Masaki Kanno @ 2008-05-12 10:15 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 506 bytes --]
Hi,
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']
This patch adds syntax checks of disk types.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Best regards,
Kan
[-- Attachment #2: blkif.patch --]
[-- Type: application/octet-stream, Size: 793 bytes --]
diff -r 810d8c3ac992 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py Thu May 08 16:58:33 2008 +0100
+++ b/tools/python/xen/xend/server/blkif.py Mon May 12 14:42:12 2008 +0900
@@ -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!'):
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add syntax check for block devices
2008-05-12 10:15 [PATCH] Add syntax check for block devices Masaki Kanno
@ 2008-05-13 10:33 ` Yosuke Iwamatsu
2008-05-14 0:00 ` Masaki Kanno
0 siblings, 1 reply; 3+ messages in thread
From: Yosuke Iwamatsu @ 2008-05-13 10:33 UTC (permalink / raw)
To: Masaki Kanno; +Cc: xen-devel
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
Hi,
I cannnot boot a guest with disks of 'tap' type specified
in the config file since cs 17617, unfortunately :-(
Attached patch would fix the issue.
Thanks,
-- Yosuke
Masaki Kanno wrote:
> Hi,
>
> 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']
>
> This patch adds syntax checks of disk types.
>
>
> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
>
> Best regards,
> Kan
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
[-- Attachment #2: blk_syntax_check_tap.patch --]
[-- Type: all/allfiles, Size: 946 bytes --]
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add syntax check for block devices
2008-05-13 10:33 ` Yosuke Iwamatsu
@ 2008-05-14 0:00 ` Masaki Kanno
0 siblings, 0 replies; 3+ messages in thread
From: Masaki Kanno @ 2008-05-14 0:00 UTC (permalink / raw)
To: Yosuke Iwamatsu; +Cc: xen-devel
Tue, 13 May 2008 19:33:08 +0900, Yosuke Iwamatsu wrote:
>Hi,
>
>I cannnot boot a guest with disks of 'tap' type specified
>in the config file since cs 17617, unfortunately :-(
>Attached patch would fix the issue.
>
>Thanks,
> -- Yosuke
Oops! Thank you, Yosuke.
Best regards,
Kan
>
>Masaki Kanno wrote:
>> Hi,
>>
>> 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']
>>
>> This patch adds syntax checks of disk types.
>>
>>
>> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
>>
>> Best regards,
>> Kan
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
>-------------------------------text/plain-------------------------------
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-14 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-12 10:15 [PATCH] Add syntax check for block devices Masaki Kanno
2008-05-13 10:33 ` Yosuke Iwamatsu
2008-05-14 0:00 ` Masaki Kanno
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.