[libvirt] [PATCH] Allow setting migration max downtime any time

Jiri Denemark jdenemar at redhat.com
Tue Sep 30 11:35:52 UTC 2014


On Mon, Sep 29, 2014 at 13:45:28 +0000, chris.a.st.pierre at gmail.com wrote:
> From: "Chris St. Pierre" <chris.a.st.pierre at gmail.com>
> 
> This removes the artificial and unnecessary restriction that
> virDomainSetMaxDowntime() only be called while a migration is in
> progress.
> ---
>  src/qemu/qemu_driver.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 6606154..7e53752 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -12023,12 +12023,6 @@ qemuDomainMigrateSetMaxDowntime(virDomainPtr dom,
>  
>      priv = vm->privateData;
>  
> -    if (priv->job.asyncJob != QEMU_ASYNC_JOB_MIGRATION_OUT) {
> -        virReportError(VIR_ERR_OPERATION_INVALID,
> -                       "%s", _("domain is not being migrated"));
> -        goto endjob;
> -    }
> -
>      VIR_DEBUG("Setting migration downtime to %llums", downtime);
>      qemuDomainObjEnterMonitor(driver, vm);
>      ret = qemuMonitorSetMigrationDowntime(priv->mon, downtime);

All other qemuDomainMigrareSet* APIs are allowed even when migration has
not been started yet and there's not reason to keep the check here.

ACK and pushed.

Jirka




More information about the libvir-list mailing list