]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: use proper job type for qemuDomainAuthorizedSSHKeysSet()
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 13 Jun 2026 04:35:47 +0000 (06:35 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 20 Jun 2026 06:56:38 +0000 (08:56 +0200)
The qemuDomainAuthorizedSSHKeysSet() call currently uses
VIR_AGENT_JOB_QUERY. While it's not an issue as this call does not
modify any of the libvirt-stored state, semantically it modifies
the domain, so VIR_AGENT_JOB_MODIFY fits better. Also, similar
calls like qemuDomainSetUserPassword() or qemuDomainSetTime()
already use VIR_AGENT_JOB_MODIFY, so use it in
qemuDomainAuthorizedSSHKeysSet() too.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_driver.c

index b4cc09c81a01649c907b5b98c30c9ad819dcc542..63afcceb93bcd91d135d85d28c972b17c99d7bdf 100644 (file)
@@ -20396,7 +20396,7 @@ qemuDomainAuthorizedSSHKeysSet(virDomainPtr dom,
     if (virDomainAuthorizedSshKeysSetEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
-    if (virDomainObjBeginAgentJob(vm, VIR_AGENT_JOB_QUERY) < 0)
+    if (virDomainObjBeginAgentJob(vm, VIR_AGENT_JOB_MODIFY) < 0)
         goto cleanup;
 
     if (!qemuDomainAgentAvailable(vm, true))