From: Peter Krempa Date: Mon, 14 Sep 2020 15:59:07 +0000 (+0200) Subject: qemu: backup: Write TLS cert and secret object aliases into status XML X-Git-Tag: v6.8.0-rc1~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a5f35dbd2c4d83f7629579bcd8b23929a492b29;p=thirdparty%2Flibvirt.git qemu: backup: Write TLS cert and secret object aliases into status XML 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 Reviewed-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 2f1a612803..4e61a5e52b 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -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: