Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 652150

Summary: Restart xend causes losing running guest after crash with "on_crash=rename-restart"
Product: Red Hat Enterprise Linux 5 Reporter: YangGuang <gyang>
Component: xenAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 5.6CC: jzheng, leiwang, mrezanin, mshao, xen-maint, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-126.el5 Doc Type: Bug Fix
Doc Text:
Previously, when the "rename-restart" option was set as a reaction to a guest termination and the xend daemon was restarted after the guest crashed, xend lost track of the new guest instance. This bug has been fixed, and all guests are now visible via xend after the daemon restart.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 09:15:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 514499    
Attachments:
Description Flags
configuration file of pv guest
none
dmesg info
none
xend.log none

Description YangGuang 2010-11-11 06:55:51 UTC
Description of problem:
I have add "on_crash = rename-restart" to the pv guest config file. After guest crashed, restart xend will causes losing running guest. 

Version-Release number of selected component (if applicable):
kernel-xen-2.6.18-231.el5
xen-3.0.3-117.el5

How reproducible:
100%

Steps to Reproduce:
1.create a PV guest with "on_crash = rename-restart"
   [host]#xm cr pv-32-rhel5u5.cfg 


2.using "xm list" to watch guest state:
   [host]# xm li
   Name                                      ID Mem(MiB) VCPUs State   Time(s)
   Domain-0                                   0    32768    32 r-----    859.7
   xen-pv-guest-rhel5                         4      511     4 -b----     22.0


3.vnc to guest, make it crash.
   [guest]# echo c > /proc/sysrq-trigger


4.Using "xm list" to watch guest state:
   [host]# xm li
   Name                                      ID Mem(MiB) VCPUs State   Time(s)
   Domain-0                                   0    32768    32 r-----    944.1
   xen-pv-guest-rhel5                         5      511     4 -b----     20.0
   xen-pv-guest-rhel5-1                       4      511     1 ----c-     41.0

5.Restart xend.
  [host]# service xend restart


6.Using "xm list" to watch guest state:
   [host]# xm li
   Name                                      ID Mem(MiB) VCPUs State   Time(s)
   Domain-0                                   0    32768    32 r-----   1013.0
   xen-pv-guest-rhel5                         4      511     1 ----c-     41.0

Actual results:
1. After step6, running guest is disappear.

Expected results:
1. After step6, running guest should work well.

Additional info:

Comment 1 YangGuang 2010-11-11 06:57:04 UTC
Created attachment 459665 [details]
configuration file of pv guest

Comment 2 YangGuang 2010-11-11 11:49:51 UTC
Created attachment 459729 [details]
dmesg info

Comment 3 YangGuang 2010-11-11 11:50:40 UTC
Created attachment 459730 [details]
xend.log

Comment 4 Miroslav Rezanina 2010-12-02 10:40:54 UTC
Testing shows that rename is not properly propagated to hv so after restart, all rename data are only in xenstore but xend reload old infos from hv.

Comment 7 Miroslav Rezanina 2011-03-17 09:54:45 UTC
Fix built into xen-3.0.3-126.el5

Comment 9 Yuyu Zhou 2011-03-18 06:22:56 UTC
reproduced the bug on xen-3.0.3-117.el5 and verified the bug on xen-3.0.3-126.el5.

on xen-3.0.3-126.el5
Steps:
1.create a PV guest with "on_crash = rename-restart"
2.vnc to guest, make it crash.
3. Using "xm list" to watch guest state:
# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     5929     4 r-----     41.0
RHEL6.1-64-PV                              2     1023     1 -b----     15.2
RHEL6.1-64-PV-1                            1     1023     1 ----c-     12.2
4.Restart xend.
5. check the guest state again:
# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     5929     4 r-----     41.7
RHEL6.1-64-PV                              2     1023     1 -b----     15.2
RHEL6.1-64-PV-1                            1     1023     1 ----c-     12.2

So Change the status to VERIFIED.

Comment 10 Tomas Capek 2011-07-13 13:20:52 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, when the "rename-restart" option was set as a reaction to a guest termination and the xend daemon was restarted after the guest crashed, xend lost track of the new guest instance. This bug has been fixed, and all guests are now visible via xend after the daemon restart.

Comment 11 errata-xmlrpc 2011-07-21 09:15:43 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-2011-1070.html

Comment 12 errata-xmlrpc 2011-07-21 11:59:28 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-2011-1070.html