Bug 839661 - libvirt: support QMP event for S4
Summary: libvirt: support QMP event for S4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 827499
Blocks: 761491 804821 808463
TreeView+ depends on / blocked
 
Reported: 2012-07-12 14:02 UTC by Luiz Capitulino
Modified: 2013-02-21 07:19 UTC (History)
14 users (show)

Fixed In Version: libvirt-0.10.2-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: S4 event was not supported by libvirt on QEMU domains. Consequence: Management applications couldn't know whether guest was suspended to disk or powered off. Fix: Support for S4 event was added. Result: Management applications can now request receiving S4 events.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:19:19 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Luiz Capitulino 2012-07-12 14:02:36 UTC
QMP will soon get support to emit an event when the guest suspends to disk (S4). Libvirt should recognize this event.

Comment 3 Ademar Reis 2012-07-30 20:42:04 UTC
Do we already have support for the S3 event in libvirt? Otherwise we should either open a new bug or change this one to include the S3 event as well (the event is there in qemu already).

Comment 4 Martin Kletzander 2012-07-31 08:40:13 UTC
(In reply to comment #3)
Yes, S3 event is already supported in libvirt (since 0.9.11 if I'm right). We are just waiting how the new event will be implemented to modify the code accordingly.

Comment 8 hongming 2012-10-16 10:17:33 UTC
Because the following result. Change its status to ASSIGNED.

# rpm -q libvirt
libvirt-0.10.2-3.el6.x86_64


# python /usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py 
Using uri:qemu:///system
Traceback (most recent call last):
  File "/usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py", line 570, in <module>
    main()
  File "/usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py", line 557, in main
    vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, myDomainEventPMSuspendDiskCallback, None)
NameError: global name 'myDomainEventPMSuspendDiskCallback' is not defined
Closing <libvirt.virConnect instance at 0x1704638>

Comment 10 hongming 2012-10-17 03:50:59 UTC
Verify it as follows. The result is expected. So move its status to VERIFIED.

# rpm -q libvirt 
libvirt-0.10.2-4.el6.x86_64


# virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     rhel6.3-new                    running

# virsh dompmsuspend rhel6.3-new --target disk
Domain rhel6.3-new successfully suspended

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6.3-new                    shut off

# virsh start rhel6.3-new
Domain rhel6.3-new started

# python /usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py 
Using uri:qemu:///system
myDomainEventPMSuspendDiskCallback: Domain rhel6.3-new(6) system pmsuspend_disk
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) PMSuspended Disk
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) PMSuspended Disk
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) Shutdown Finished
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) Shutdown Finished
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) Stopped Shutdown
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) Stopped Shutdown
myDomainEventCallback1 EVENT: Domain rhel6.3-new(7) Started Booted
myDomainEventCallback2 EVENT: Domain rhel6.3-new(7) Started Booted

Comment 11 errata-xmlrpc 2013-02-21 07:19:19 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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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