[libvirt] [PATCH 0/4] qemu: Allow concurrent access to monitor and guest agent

Michal Privoznik posted 4 patches 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1528465164.git.mprivozn@redhat.com
Test syntax-check passed
There is a newer version of this series
src/qemu/THREADS.txt   |  62 ++++++++++++++++--
src/qemu/qemu_domain.c | 169 +++++++++++++++++++++++++++++++++++++++----------
src/qemu/qemu_domain.h |  29 +++++++++
src/qemu/qemu_driver.c |  91 ++++++++++++++++----------
4 files changed, 281 insertions(+), 70 deletions(-)
[libvirt] [PATCH 0/4] qemu: Allow concurrent access to monitor and guest agent
Posted by Michal Privoznik 5 years, 9 months ago
It is very easy to see these patches in action. Just apply the following
diff:

diff --git i/src/qemu/qemu_agent.c w/src/qemu/qemu_agent.c
index 10c6ef09fa..dd48caecb7 100644
--- i/src/qemu/qemu_agent.c
+++ w/src/qemu/qemu_agent.c
@@ -1702,6 +1702,8 @@ qemuAgentGetTime(qemuAgentPtr mon,
                          VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK) < 0)
         goto cleanup;
 
+    sleep(120);
+
     if (virJSONValueObjectGetNumberUlong(reply, "return", &json_time) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("malformed return value"));


This is to simulate a slow guest agent. Then all you need to do is run:
'virsh domtime $dom' and then 'virsh domstats $dom' from another
terminal.

Enjoy.

Michal Privoznik (4):
  qemu: Introduce qemuDomainAgentJob
  qemu: Introduce APIs for manipulating qemuDomainAgentJob
  qemuDomainAgentJob: Introduce query and modify jobs
  qemu: Switch code to use new agent job APIs

 src/qemu/THREADS.txt   |  62 ++++++++++++++++--
 src/qemu/qemu_domain.c | 169 +++++++++++++++++++++++++++++++++++++++----------
 src/qemu/qemu_domain.h |  29 +++++++++
 src/qemu/qemu_driver.c |  91 ++++++++++++++++----------
 4 files changed, 281 insertions(+), 70 deletions(-)

-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list