xend startup fails if /var/log/xen does not exist

Bug #89133 reported by Lukas Fittl
2
Affects Status Importance Assigned to Milestone
xen-3.0 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If the Xen in Feisty is used together with LVM, it fails because LVM starts before xend starts, and assigns 254 as a major device number. Then xend comes along and has a hardcoded major device number of 254 which of course clashes with the one of LVM, which then leads to xend not being able to start.

The problem would be fixed by the following patch which has also been applied xen upstream: http://lists.xensource.com/archives/html/xen-devel/2006-09/msg00867.html

Please consider integrating this patch for Feisty as Xen won't work without it.

Reproduceable on an AMD64 machine, not tested on i386.

Revision history for this message
Lukas Fittl (lfittl) wrote :

Ok, I now tried patching the source myself, and failed, because the structure of the code seems different in our Xen, as well as the code already seems to do dynamic device number selection.

Do you have any idea why that could happen?

root@core:~# ls -lisa /dev/xen/blktap0
8559 0 crw-rw---- 1 root root 254, 0 Mar 2 04:41 /dev/xen/blktap0

root@core:~# ls -lisa /dev/mapper/main-backup
5128 0 brw-rw---- 1 root disk 254, 0 Mar 2 04:41 /dev/mapper/main-backup

---

Mar 2 04:50:56 core BLKTAPCTRL: blktapctrl: v1.0.0
Mar 2 04:50:56 core BLKTAPCTRL: Found driver: [raw image (aio)]
Mar 2 04:50:56 core BLKTAPCTRL: Found driver: [raw image (sync)]
Mar 2 04:50:56 core BLKTAPCTRL: Found driver: [vmware image (vmdk)]
Mar 2 04:50:56 core BLKTAPCTRL: Found driver: [ramdisk image (ram)]
Mar 2 04:50:56 core BLKTAPCTRL: Found driver: [qcow disk (qcow)]
Mar 2 04:50:56 core BLKTAPCTRL: /dev/xen/blktap0 device already exists
Mar 2 04:50:56 core BLKTAPCTRL: blktap0 open failed
Mar 2 04:50:56 core BLKTAPCTRL: Unable to start blktapctrl

Revision history for this message
Chuck Short (zulcss) wrote :

This has already been applied in our release.

You might want to have a look at this:

http://wiki.xensource.com/xenwiki/DebianDomU

Changed in xen-source:
status: Unconfirmed → Needs Info
Revision history for this message
Lukas Fittl (lfittl) wrote :

Still, "invoke-rc.d xend start" keeps creating /dev/xen/blktap0 with 254 as major device number (I re-checked by stopping xenstored and blktapctl, deleting /dev/xen and then starting xend). Could this problem be related to the fact that xen does not use udev for this kind of stuff?

Revision history for this message
Lukas Fittl (lfittl) wrote :

Ok, seems I have been running into the wrong direction. LVM+Xen works on x86, but fails on AMD64. I now think this has nothing to do with LVM at all (seems logical as Xen uses 254 as character device, and LVM as block device), but rather with blktapctl that does some weird stuff.

Revision history for this message
Lukas Fittl (lfittl) wrote :

I have now been able to find the problem, for some reason the xen packages do not create /var/log/xen, and if this directory does not exist, xend startup fails without any informative error message.

Revision history for this message
Chuck Short (zulcss) wrote :

Yes it does.

Revision history for this message
Chuck Short (zulcss) wrote :

Modified init script.

Changed in xen-3.0:
status: Needs Info → Fix Committed
Chuck Short (zulcss)
Changed in xen-3.0:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.