2014-02-21 22:21:21 +01:00
|
|
|
QA output created by 081
|
|
|
|
|
|
|
|
== creating quorum files ==
|
2014-12-09 08:38:03 +01:00
|
|
|
Formatting 'TEST_DIR/1.IMGFMT', fmt=IMGFMT size=10485760
|
|
|
|
Formatting 'TEST_DIR/2.IMGFMT', fmt=IMGFMT size=10485760
|
|
|
|
Formatting 'TEST_DIR/3.IMGFMT', fmt=IMGFMT size=10485760
|
2014-02-21 22:21:21 +01:00
|
|
|
|
|
|
|
== writing images ==
|
|
|
|
wrote 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
|
|
|
== checking quorum write ==
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
|
|
|
== corrupting image ==
|
|
|
|
wrote 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
|
|
|
== checking quorum correction ==
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
2014-02-21 22:30:38 +01:00
|
|
|
== checking mixed reference/option specification ==
|
2015-10-19 17:53:10 +02:00
|
|
|
Testing:
|
2014-02-21 22:30:38 +01:00
|
|
|
QMP_VERSION
|
|
|
|
{"return": {}}
|
|
|
|
{"return": {}}
|
2015-10-19 17:53:10 +02:00
|
|
|
{"return": {}}
|
2016-03-11 15:14:47 +01:00
|
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "QUORUM_REPORT_BAD", "data": {"node-name": "drive2", "sectors-count": 20480, "sector-num": 0, "type": "read"}}
|
2014-02-21 22:30:38 +01:00
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
{"return": ""}
|
|
|
|
{"return": {}}
|
shutdown: Expose bool cause in SHUTDOWN and RESET events
Libvirt would like to be able to distinguish between a SHUTDOWN
event triggered solely by guest request and one triggered by a
SIGTERM or other action on the host. While qemu_kill_report() was
already able to give different output to stderr based on whether a
shutdown was triggered by a host signal (but NOT by a host UI event,
such as clicking the X on the window), that information was then
lost to management. The previous patches improved things to use an
enum throughout all callsites, so now we have something ready to
expose through QMP.
Note that for now, the decision was to expose ONLY a boolean,
rather than promoting ShutdownCause to a QAPI enum; this is because
libvirt has not expressed an interest in anything finer-grained.
We can still add additional details, in a backwards-compatible
manner, if a need later arises (if the addition happens before 2.10,
we can replace the bool with an enum; otherwise, the enum will have
to be in addition to the bool); this patch merely adds a helper
shutdown_caused_by_guest() to map the internal enum into the
external boolean.
Update expected iotest outputs to match the new data (complete
coverage of the affected tests is obtained by -raw, -qcow2, and -nbd).
Here is output from 'virsh qemu-monitor-event --loop' with the
patch installed:
event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true}
event STOP at 1492639680.732116 for domain fedora_13: <null>
event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false}
Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event
was triggered by an action I took directly in the guest (shutdown -h),
at which point qemu stops the vcpus and waits for libvirt to do any
final cleanups; the second SHUTDOWN event is the result of libvirt
sending SIGTERM now that it has completed cleanup. Libvirt is already
smart enough to only feed the first qemu SHUTDOWN event to the end user
(remember, virsh qemu-monitor-event is a low-level debugging interface
that is explicitly unsupported by libvirt, so it sees things that normal
end users do not); changing qemu to emit SHUTDOWN only once is outside
the scope of this series.
See also https://bugzilla.redhat.com/1384007
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170515214114.15442-6-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2017-05-15 23:41:14 +02:00
|
|
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
|
2014-02-21 22:30:38 +01:00
|
|
|
|
|
|
|
|
2014-06-11 15:24:10 +02:00
|
|
|
== using quorum rewrite corrupted mode ==
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
|
|
|
== checking that quorum has corrected the corrupted file ==
|
|
|
|
read 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
2014-02-21 22:21:21 +01:00
|
|
|
== breaking quorum ==
|
|
|
|
wrote 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2014-06-11 15:24:10 +02:00
|
|
|
wrote 10485760/10485760 bytes at offset 0
|
|
|
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2014-02-21 22:21:21 +01:00
|
|
|
|
|
|
|
== checking that quorum is broken ==
|
2014-11-20 16:27:07 +01:00
|
|
|
read failed: Input/output error
|
2014-02-21 22:21:21 +01:00
|
|
|
*** done
|