Bug 468971 - Xen domain cannot be rebooted after restarting xend
Xen domain cannot be rebooted after restarting xend
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
:
Depends On:
Blocks: 474579 477162
  Show dependency treegraph
 
Reported: 2008-10-29 05:53 EDT by Jiri Denemark
Modified: 2009-12-14 16:11 EST (History)
2 users (show)

See Also:
Fixed In Version: xen-3.0.3-85.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 06:07:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jiri Denemark 2008-10-29 05:53:30 EDT
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 Berrange 2008-10-29 06:11:59 EDT
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 06:40:41 EDT
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 11:14:50 EST
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 05:57:45 EST
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 06:08:10 EST
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 06:27:28 EST
Cool stuff, it really works. Great job...

(Oh man, why did I ask myself? :-))
Comment 8 Jiri Denemark 2009-05-11 09:40:31 EDT
Fix built into xen-3.0.3-85.el5
Comment 12 errata-xmlrpc 2009-09-02 06:07:35 EDT
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.