Bug 526046 - xend fails to start with readonly root filesystem
Summary: xend fails to start with readonly root filesystem
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-28 13:50 UTC by Alexander Todorov
Modified: 2011-01-13 23:05 UTC (History)
7 users (show)

Fixed In Version: initscripts-8.45.32-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-01-13 23:05:34 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0075 normal SHIPPED_LIVE initscripts bug fix update 2011-01-12 17:22:01 UTC

Description Alexander Todorov 2009-09-28 13:50:38 UTC
Description of problem:
service xend start fails when / is read-only.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure readonly-root in /etc/sysconfig/readonly-root:
2. reboot the system
Actual results:
xend fails to start with traceback.

Expected results:
xend starts because RHEL5 supports readonly file system.

Additional info:
traceback found in /var/log/xen/xend.log

[2009-09-28 09:42:40 xend 2842] INFO (SrvDaemon:283) Xend Daemon started
[2009-09-28 09:42:40 xend 2842] INFO (SrvDaemon:287) Xend changeset: unavailable.
[2009-09-28 09:42:40 xend 2842] ERROR (SrvDaemon:297) Exception starting xend ([Errno 30] Read-only file system: '/var/lib/xend')
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 290, in run
  File "/usr/lib/python2.4/site-packages/xen/xend/server/relocate.py", line 124, in listenRelocation
    unix.UnixListener(path, RelocationProtocol)
  File "/usr/lib/python2.4/site-packages/xen/web/unix.py", line 49, in __init__
    connection.SocketListener.__init__(self, protocol_class)
  File "/usr/lib/python2.4/site-packages/xen/web/connection.py", line 81, in __init__
    self.sock = self.createSocket()
  File "/usr/lib/python2.4/site-packages/xen/web/unix.py", line 53, in createSocket
    return bind(self.path)
  File "/usr/lib/python2.4/site-packages/xen/web/unix.py", line 34, in bind
    os.chown(parent, os.geteuid(), os.getegid())
OSError: [Errno 30] Read-only file system: '/var/lib/xend'
[2009-09-28 09:42:40 xend 2841] INFO (SrvDaemon:183) Xend exited with status 1.

Comment 1 Alexander Todorov 2009-09-28 13:53:57 UTC
Use case for comment #0:
1) Configure single OS image for hypervisor
2) Boot the image in 1) on multiple bare-metal machines via PXE, / is on network file system and is mounted read only.
3) Start multiple domU instances on the bare metal machines. 

I still haven't tested the same use case with KVM.

Comment 2 Daniel Berrangé 2009-09-28 14:11:50 UTC
Even if running read-only root there needs to be some writable area for apps to use. So IMHO if you want to run XenD on a readonly root you should bind mount the directories XenD writes into to the writable area.

Comment 3 Alexander Todorov 2009-09-28 14:36:56 UTC
That should be done automatically same way /etc/resolv.conf is bind mounted for example. 

To clarify:
Dom0 rootfs is read-only and  DomU rootfs is read-only too. Read/Write space is available via network for the apps in DomU to write to. 

Dom0 task is to create copies (via virt-clone) of the same DomU config file and start them. The domain config file attaches to the underlying block device read-only so that multiple copies with the same disk image can be started.

Comment 4 Alexander Todorov 2009-09-30 12:53:21 UTC
FYI: looks like /var/lib/xen is already bind mounted but not /var/lib/xend

Comment 6 Alexander Todorov 2009-10-07 08:02:16 UTC
changing to proper component

Comment 8 Bill Nottingham 2009-10-07 15:34:06 UTC

is the upstream commit. ACK for 5.5, although given that there's a workaround (add the requisite entry in a user-written rwtab.d file), I'm not sure why it would be considered a blocker.

Comment 9 RHEL Product and Program Management 2009-11-06 19:23:12 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 10 RHEL Product and Program Management 2010-06-04 15:59:30 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 14 errata-xmlrpc 2011-01-13 23:05:34 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.