RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1269575 - Guest state "crashed" does not get updated after "virsh reset"
Summary: Guest state "crashed" does not get updated after "virsh reset"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-07 15:04 UTC by Thomas Huth
Modified: 2016-11-03 18:25 UTC (History)
9 users (show)

Fixed In Version: libvirt-2.0.0-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:25:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Thomas Huth 2015-10-07 15:04:28 UTC
Description of problem:
The state of a crashed guest does not get updated after rebooting it via "virsh reset"

Version-Release number of selected component (if applicable):
libvirt-client-1.2.17-12.el7.ppc64le
qemu-kvm-rhev-2.3.0-28.el7.ppc64le

How reproducible:
100%

Steps to Reproduce:
1. Edit the XML definition of a guest so that it does not reboot
   automatically when it crashed:
     <on_crash>preserve</on_crash>
2. Start the guest and crash it by typing the following from the
   guest console:
     echo c > /proc/sysrq-trigger
3. Use "virsh list" from the host to check that the guest is
   in the "crashed" state
4. Reboot the guest by using "virsh reset" from the host
5. Issue "virsh list" again to check the state of the guest

Actual results:
The guest state is still shown as "crashed"

Expected results:
The guest state should be shown as "running" again

Comment 2 Martin Kletzander 2016-07-14 12:33:05 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2016-July/msg00439.html

Comment 3 Martin Kletzander 2016-08-02 11:38:36 UTC
Fixed upstream with v2.1.0-rc1-34-gdaf01a61254c:

commit daf01a61254cc21d90e15dae8080f13e9a34b489
Author: Martin Kletzander <mkletzan>
Date:   Wed Jul 13 16:13:58 2016 +0200

    qemu: Fix domain state after reset

Comment 6 Fangge Jin 2016-08-15 09:24:06 UTC
Reproduce this BZ on build libvirt-2.0.0-4.el7.x86_64

Steps:
0. Prepare a guest as below:
# virsh dumpxml rhel7
...
  <features>
    <acpi/>
    <apic/>
    <pmu state='on'/>
  </features>
...
  <on_crash>preserve</on_crash>
...


1. Start guest

2. In guest, # echo c > /proc/sysrq-trigger

3. Check guest status:
# virsh list
 Id    Name                           State
----------------------------------------------------
 6     rhel7                          crashed

4.Reset guest, and check status:
# virsh reset rhel7
Domain rhel7 was reset

# virsh list
 Id    Name                           State
----------------------------------------------------
 6     rhel7                          crashed

Comment 7 Fangge Jin 2016-08-15 09:33:51 UTC
Verify pass on build libvirt-2.0.0-5.el7.x86_64

Steps:
0. Prepare a guest as below:
# virsh dumpxml rhel7
...
  <features>
    <acpi/>
    <apic/>
    <pmu state='on'/>
  </features>
...
  <on_crash>preserve</on_crash>
...
    <panic model='isa'>
      <address type='isa' iobase='0x505'/>
    </panic>
...

1. Start guest

2. In guest: # echo c > /proc/sysrq-trigger

3. Check guest status
# virsh list
 Id    Name                           State
----------------------------------------------------
 80    rhel7                          crashed

# virsh domstate rhel7 --reason
crashed (panicked)

4. Reset guest and check guest status again:

# virsh reset rhel7
Domain rhel7 was reset

# virsh list
 Id    Name                           State
----------------------------------------------------
 80    rhel7                          paused

# virsh domstate rhel7 --reason
paused (crashed)

5.Resume guest and check guest status again:

# virsh resume rhel7
Domain rhel7 resumed

# virsh list
 Id    Name                           State
----------------------------------------------------
 80    rhel7                          running

# virsh domstate rhel7 --reason
running (unpaused)

Comment 8 Fangge Jin 2016-08-15 09:41:34 UTC
Hi Martin,

I have a question, why the guest is paused instead of running after reset?

Thank you!

Comment 9 Martin Kletzander 2016-08-15 11:17:20 UTC
Because that's how QEMU behaves.  You can start it afterwards normally.  Also the output of 'virsh domstate --reason' should be paused (crashed).

Comment 11 errata-xmlrpc 2016-11-03 18:25:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


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