Bug 468971 - Xen domain cannot be rebooted after restarting xend
Summary: Xen domain cannot be rebooted after restarting xend
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 474579 477162
TreeView+ depends on / blocked
 
Reported: 2008-10-29 09:53 UTC by Jiri Denemark
Modified: 2009-12-14 21:11 UTC (History)
2 users (show)

Fixed In Version: xen-3.0.3-85.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 10:07:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to fix this bug (409 bytes, patch)
2008-12-08 10:57 UTC, Jiri Denemark
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1328 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2009-09-01 10:32:30 UTC

Description Jiri Denemark 2008-10-29 09:53:30 UTC
Description of problem:

Running domain cannot be rebooted once xend was restarted.

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

3.0.3-64.el5, 3.0.3-73.el5

How reproducible:

always

Steps to Reproduce:
1. install Xen domU using an image file
2. xm create domU
2. service xend restart
3. xm reboot domU
  
Actual results:

Rebooting fails with (/var/log/xen/xend.log)

[2008-10-30 06:11:28 xend.XendDomainInfo 10655] ERROR (XendDomainInfo:212) Domain construction failed
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 205, in create
    vm.initDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1483, in initDomain
    channel_details = self.image.createImage()
  File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 120, in createImage
    return self.createDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 129, in createDomain
    raise VmError('Kernel image does not exist: %s' % self.kernel)
VmError: Kernel image does not exist: /var/lib/xen/boot_kernel.Ta2u5w
[2008-10-30 06:11:28 xend.XendDomainInfo 10655] DEBUG (XendDomainInfo:1589) XendDomainInfo.destroy: domid=7
[2008-10-30 06:11:28 xend.XendDomainInfo 10655] DEBUG (XendDomainInfo:1597) XendDomainInfo.destroyDomain(7)
[2008-10-30 06:11:28 xend.XendDomainInfo 10655] ERROR (XendDomainInfo:1893) Failed to restart domain 6.
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1878, in restart
    new_dom = XendDomain.instance().domain_create(config)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 238, in domain_create
    dominfo = XendDomainInfo.create(config)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 205, in create
    vm.initDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1483, in initDomain
    channel_details = self.image.createImage()
  File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 120, in createImage
    return self.createDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 129, in createDomain
    raise VmError('Kernel image does not exist: %s' % self.kernel)
VmError: Kernel image does not exist: /var/lib/xen/boot_kernel.Ta2u5w


Expected results:

successful reboot


Additional info:

Comment 1 Daniel Berrangé 2008-10-29 10:11:59 UTC
I don't think this is neccessarily related to the fact that you did a 'service xend restart' - I'm pretty sure I've seen this without having restarted xend. I'm betting on some kind of race condition.

Comment 2 Jiri Denemark 2008-10-29 10:40:41 UTC
Well, maybe it is not related but it happens to me every time I restart xend service. Being always reproducible, it would be a very nice race condition.

Comment 4 Jiri Denemark 2008-11-27 16:14:50 UTC
OK, this is really related to the fact xend daemon is restarted. After restarting the daemon, bootloader and bootloader_args are lost from domain's configuration. It seems upstream is also affected although it dies with a bit different error...

Comment 5 Jiri Denemark 2008-12-08 10:57:45 UTC
Created attachment 326110 [details]
Patch to fix this bug

When xend is restarted, bootloader settings of all running domains are
lost. The attached patches fixes this by saving bootloader and bootloader_args to
xenstore database. Forward-ported version of this patch is already upstream as
c/s 18859 (http://xenbits.xensource.com/xen-unstable.hg?rev/63aa939c114c).

Comment 6 Jiri Denemark 2009-02-23 11:08:10 UTC
A test package which fixes this issue (and several others as well) has been
made available at:

http://people.redhat.com/jdenemar/xen/

Could the reporter try it out and report if it fixes the problem or not?

Thank you for your cooperation.

Comment 7 Jiri Denemark 2009-02-23 11:27:28 UTC
Cool stuff, it really works. Great job...

(Oh man, why did I ask myself? :-))

Comment 8 Jiri Denemark 2009-05-11 13:40:31 UTC
Fix built into xen-3.0.3-85.el5

Comment 12 errata-xmlrpc 2009-09-02 10:07:35 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.

http://rhn.redhat.com/errata/RHBA-2009-1328.html


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