libvirt/tests/qemustatusxml2xmldata
Jonathon Jongsma 95f5ac9ae5 Add API to change qemu agent response timeout
Some layered products such as oVirt have requested a way to avoid being
blocked by guest agent commands when querying a loaded vm. For example,
many guest agent commands are polled periodically to monitor changes,
and rather than blocking the calling process, they'd prefer to simply
time out when an agent query is taking too long.

This patch adds a way for the user to specify a custom agent timeout
that is applied to all agent commands.

One special case to note here is the 'guest-sync' command. 'guest-sync'
is issued internally prior to calling any other command. (For example,
when libvirt wants to call 'guest-get-fsinfo', we first call
'guest-sync' and then call 'guest-get-fsinfo').

Previously, the 'guest-sync' command used a 5-second timeout
(VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT), whereas the actual command that
followed always blocked indefinitely
(VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK). As part of this patch, if a
custom timeout is specified that is shorter than
5 seconds,  this new timeout is also used for 'guest-sync'. If there is
no custom timeout or if the custom timeout is longer than 5 seconds, we
will continue to use the 5-second timeout.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2019-11-14 19:10:01 +01:00
..
blockjob-blockdev-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
blockjob-blockdev-out.xml tests: qemustatusxml2xml: Add test case for block job tracking 2019-07-18 17:59:34 +02:00
blockjob-mirror-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
blockjob-mirror-out.xml tests: qemuxml2xml: Add proper domain status XML testing 2018-03-13 13:54:11 +01:00
disk-secinfo-upgrade-in.xml qemu: domain: Regenerate alias for the TLS x509 credential object 2018-06-05 08:13:57 +02:00
disk-secinfo-upgrade-out.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
migration-in-params-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
migration-in-params-out.xml qemuxml2xmltest: Add status XML tests for migration params 2018-04-17 10:46:23 +02:00
migration-out-nbd-in.xml tests: qemu: Extend the test suite with the 'output' sound codec 2018-05-23 09:51:53 +02:00
migration-out-nbd-out.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
migration-out-nbd-tls-in.xml qemu: domain: Modify <migrationSource> to look like <disk> 2019-04-03 11:58:09 +02:00
migration-out-nbd-tls-out.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
migration-out-params-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
migration-out-params-out.xml qemuxml2xmltest: Add status XML tests for migration params 2018-04-17 10:46:23 +02:00
modern-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
modern-out.xml tests: qemuxml2xml: Add modern example of status XML to the test 2018-03-13 13:54:11 +01:00
vcpus-multi-in.xml Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
vcpus-multi-out.xml tests: qemuxml2xml: Add proper domain status XML testing 2018-03-13 13:54:11 +01:00