Description of problem: Xend should do syntax check for block devices for either config file(using when create guest ) and command line(using when attach disk to guest), otherwise guest would expose to kernel panic or can not see the attached disk. Such as: 1. disk = ['files:/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w'] 2. disk = [':/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w'] 3. disk = ['/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w'] 4. # xm block-attach vm1 /xen-autotest/images/RHEL-Server-5.5-64-pv.raw xvdc:disk r Version-Release number of selected component (if applicable): xen-3.0.3-120.el5 How reproducible: Always Steps to Reproduce: Please refer to Description. Actual results: Guest panics or block-attach fails. Expected results: xend check the syntax and report warnings. Additional info: A patch in upstream would fix this problem. It would be back-ported into RHEL soon.
Created attachment 463883 [details] patch for this bug This is the patch back-ported from upstream. It does syntax check before adding information into xenstore.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release.
QA verified this bug on xen-3.0.3-126.el5: 1. Create a guest with error block device syntax, like: disk = ['files:/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w'] or disk = [':/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w'] xend checks the error and prevent you from creating the guest. 2. Try to attach a block device to a PV guest, with a wrong format, like: # xm block-attach vm1 /xen-autotest/images/RHEL-Server-5.5-64-pv.raw xvdc:disk r xend/xm output shows that the syntax is error. So change this bug to VERIFIED.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, the xend daemon did not perform syntax checks for block devices either in configuration files or on the command line. As a consequence, the guest was exposed to a kernel panic or the "xm block-attach" command failed. With this update, a patch has been provided, and xend now checks the format of block device entries and parameters before adding the information into XenStore storage space, fixing these issues.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1070.html