]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: backup: Write TLS cert and secret object aliases into status XML
authorPeter Krempa <pkrempa@redhat.com>
Mon, 14 Sep 2020 15:59:07 +0000 (17:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Sep 2020 13:25:22 +0000 (15:25 +0200)
We've put the aliases into the backup job definition after the status
XML was already written so they didn't appear in the on-disk state.

Move the code putting them into the private definition earlier, so that
the status XML update done by saving blockjobs already writes them out.

Also add a note notifying that the block job status update writes the
status XML.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1870488
Fixes: 423576679a5
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_backup.c

index 2f1a6128031a736c9008f9cb21a933925913b441..4e61a5e52b93903b874b7f7f2e4fba379004cd95 100644 (file)
@@ -825,6 +825,9 @@ qemuBackupBegin(virDomainObjPtr vm,
         goto endjob;
 
     job_started = true;
+    priv->backup->tlsAlias = g_steal_pointer(&tlsAlias);
+    priv->backup->tlsSecretAlias = g_steal_pointer(&tlsSecretAlias);
+    /* qemuBackupDiskStarted saves the status XML */
     qemuBackupDiskStarted(vm, dd, ndd);
 
     if (chk) {
@@ -848,9 +851,6 @@ qemuBackupBegin(virDomainObjPtr vm,
         }
     }
 
-    priv->backup->tlsAlias = g_steal_pointer(&tlsAlias);
-    priv->backup->tlsSecretAlias = g_steal_pointer(&tlsSecretAlias);
-
     ret = 0;
 
  endjob: