[libvirt] [PATCH 4/8] qemu: Don't reset TLS in qemuMigrationRun

Peter Krempa pkrempa at redhat.com
Fri Apr 7 07:45:33 UTC 2017


On Wed, Apr 05, 2017 at 15:09:59 +0200, Jiri Denemark wrote:
> Finished qemuMigrationRun does not mean the migration itself finished
> (it might have just switched to post-copy mode). While resetting TLS
> parameters is probably OK at this point even if migration is still
> running, we want to consolidate the code which resets various migration
> parameters. Thus qemuMigrationResetTLS will be called from the Confirm
> phase (or at the end of the Perform phase in case of v2 protocol), when
> migration is either canceled or finished.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_migration.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 68e72b37f..87506c73a 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c

[...]

> @@ -4827,6 +4826,13 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
>      if (ret < 0)
>          orig_err = virSaveLastError();
>  
> +    /* v2 proto has no confirm phase so we need to reset migration parameters
> +     * here
> +     */
> +    if (!v3proto && ret < 0)
> +        qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
> +                              NULL, NULL);

At this point this is slightly non-obvious as you've stated previously
that v2 does not support TLS. The refactor to qemuMigration puts the
sense into this.

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170407/a71b61b9/attachment-0001.sig>


More information about the libvir-list mailing list