From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: [PATCH] qemu-xen-3.4-testing: Fix read-only image file handling Date: Mon, 07 Jun 2010 13:21:21 +0200 Message-ID: <4C0CD631.4030006@redhat.com> References: <4C07B678.3020304@redhat.com> <4C07B853.3000307@redhat.com> <4C08C96F.2080400@redhat.com> <20100604104250.GL17817@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100604104250.GL17817@reaktio.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?ISO-8859-1?Q?Pasi_K=E4rkk=E4inen?= Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org Well, I'm still having some tools issues, mainly: [2010-06-07 15:19:24 5346] INFO (XendNetwork:114) Not recreating missing=20 unmanaged network xenbr0 [2010-06-07 15:19:25 5346] DEBUG (XendCPUPool:747) recreate_active_pools [2010-06-07 15:19:26 5346] ERROR (SrvDaemon:349) Exception starting xend=20 ((111, 'Connection refused')) Traceback (most recent call last): File=20 "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line=20 341, in run servers =3D SrvServer.create() File=20 "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvServer.py", line=20 258, in create root.putChild('xend', SrvRoot()) File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvRoot.py",=20 line 40, in __init__ self.get(name) File "/usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 84,=20 in get val =3D val.getobj() File "/usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 52,=20 in getobj self.obj =3D klassobj() File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvNode.py",=20 line 30, in __init__ self.xn =3D XendNode.instance() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line=20 1176, in instance inst =3D XendNode() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line=20 163, in __init__ self._init_cpu_pools() File "/usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line=20 377, in _init_cpu_pools XendCPUPool.recreate_active_pools() File "/usr/lib64/python2.4/site-packages/xen/xend/XendCPUPool.py",=20 line 754, in recreate_active_pools uuid =3D xstransact.Read(path, 'uuid') File=20 "/usr/lib64/python2.4/site-packages/xen/xend/xenstore/xstransact.py",=20 line 307, in Read return complete(path, lambda t: t.read(*args)) File=20 "/usr/lib64/python2.4/site-packages/xen/xend/xenstore/xstransact.py",=20 line 361, in complete t =3D xstransact(path) File=20 "/usr/lib64/python2.4/site-packages/xen/xend/xenstore/xstransact.py",=20 line 29, in __init__ self.transaction =3D xshandle().transaction_start() File=20 "/usr/lib64/python2.4/site-packages/xen/xend/xenstore/xsutil.py", line=20 18, in xshandle xs_handle =3D xen.lowlevel.xs.xs() Error: (111, 'Connection refused') Any guess what may be going wrong? Booted grub entry: title Red Hat Enterprise Linux Server (2.6.31.13-xen HV, nolog) root (hd1,6) kernel /xen-4.1-unstable.gz module /vmlinuz-2.6.31.13 ro root=3DLABEL=3D/rhel2 rhgb quiet se= linux=3D0 module /initrd-2.6.31.13.img Mount is having `xenfs on /proc/xen type xenfs (rw)`. Any guess what may=20 be going wrong? Thanks, Michal On 06/04/2010 12:42 PM, Pasi K=E4rkk=E4inen wrote: > On Fri, Jun 04, 2010 at 11:37:51AM +0200, Michal Novotny wrote: > =20 >> Oh, one more thing I've discovered now. Since the codebase for >> qemu-xen-unstable is looking the same like for qemu-xen-3.4-testing an= d >> the patch is applicable without any modifications it could be working >> for xen-4.1 unstable as well, unfortunately I was not able to boot PVO= PS >> kernel since it always ends up in kernel panic, maybe the missing >> drivers or something like that. >> >> =20 > What kernel version? Did you use xen/stable-2.6.32.x branch from xen.gi= t? > > See my example .config files from: > http://wiki.xensource.com/xenwiki/XenParavirtOps in the "troubleshootin= g" section. > > Works on F12/F13 dom0's. > > For el5 dom0 you might need these: > http://wiki.xensource.com/xenwiki/2.6.18-to-2.6.31-and-higher > > aka > CONFIG_SYSFS_DEPRECATED=3Dy > CONFIG_SYSFS_DEPRECATED_V2=3Dy > > Also atm I think you need CONFIG_XEN_XENBUS_FRONTEND=3Dy in the .config > because of the recently added pv-on-hvm drivers (you'll get build failu= re without that option), > so you need XEN_PCIDEV_FRONTEND XEN_BLKDEV_FRONTEND or XEN_NETDEV_FRONT= END or XEN_FBDEV_FRONTEND needs to be =3Dy. > > -- Pasi > > > =20 >> On 06/03/2010 04:12 PM, Michal Novotny wrote: >> =20 >>> Oh, just one more thing that should be mentioned: >>> >>> When you want to mount an image that is set as read-only in the domai= n >>> configuration file but you omit to set mode to read-only it results >>> into I/O errors when processing the requests. Remounting as read-only >>> or unmounting and remounting using the `mount /dev/* /path/to/mount -= o >>> ro` shall do the mounting the correct way, i.e. with no I/O errors, s= o >>> make sure you mount those disks as read-only otherwise you can be >>> getting errors like: >>> >>> end_request: I/O error, dev hdb, sector 52 >>> >>> Buffer I/O error on device hdb1, logical block 1 >>> >>> lost page write due to I/O error on hdb1 >>> >>> >>> and for IDE devices you'll be getting several additional DeviceFault >>> errors since mounting the device read-write (default setting) writes >>> some data onto a disk at the mount-time. >>> >>> Michal >>> >>> On 06/03/2010 04:04 PM, Michal Novotny wrote: >>> =20 >>>> [Well, I did send an e-mail to the list using git but it's not here >>>> so I'm forwarding the e-mail to the list for sure:] >>>> >>>> Hi, >>>> this is the patch for qemu-xen-3.4-testing to fix the read-only >>>> image file handling since the image file was always treated as >>>> read-write which means that all the HVM guests were able to >>>> write to all the disk images available in domain configuration >>>> file no matter what the mode of the image was defined. This >>>> patch fixes this functionality to honor the O_RDONLY in the >>>> BDRV_O_ACCESS flag in block.c and also fixes the IDE and SCSI >>>> interfaces that uses it. >>>> >>>> It's been tested on RHEL-5 with xen-3.4-testing version of >>>> upstream xen with xen-3.4-testing qemu implementation. >>>> >>>> For SCSI devices the DATA PROTECT request sense has been added >>>> as found at: http://en.wikipedia.org/wiki/SCSI_Request_Sense_Command >>>> >>>> file no matter what the mode of the image was defined. This >>>> patch fixes this functionality to honor the O_RDONLY in the >>>> BDRV_O_ACCESS flag in block.c and also fixes the IDE and SCSI >>>> interfaces that uses it. >>>> >>>> It's been tested on RHEL-5 with xen-3.4-testing version of >>>> Michal >>>> >>>> Signed-off-by: Michal Novotny >>>> >>>> >>>> _______________________________________________ >>>> Xen-devel mailing list >>>> Xen-devel@lists.xensource.com >>>> http://lists.xensource.com/xen-devel >>>> =20 >>> >>> =20 >> >> --=20 >> Michal Novotny, RHCE >> Virtualization Team (xen userspace), Red Hat >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> =20 --=20 Michal Novotny, RHCE Virtualization Team (xen userspace), Red Hat