[Libvirt-cim] [PATCH 2 of 2] Add restart migration

Jay Gagnon grendel at linux.vnet.ibm.com
Tue Mar 25 14:25:15 UTC 2008


Dan Smith wrote:
> # HG changeset patch
> # User Dan Smith <danms at us.ibm.com>
> # Date 1206113389 25200
> # Node ID 6c2d68b9722a23a94075172270acffad1bbbad6f
> # Parent  c3dca3932e0b9f80778cbd6cbdfa09de4a7632a9
> Add restart migration
>
> Based on a patch Kaitlin started on before she left and sent to me.
>
> Signed-off-by: Dan Smith <danms at us.ibm.com>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> +static CMPIStatus handle_restart_migrate(virConnectPtr dconn,
> +                                         virDomainPtr dom,
> +                                         struct migration_job *job)
> +{
> +        CMPIStatus s = {CMPI_RC_OK, NULL};
> +        int ret;
> +        int i;
> +
> +        CU_DEBUG("Shutting down domain for migration");
> +        ret = virDomainShutdown(dom);
> +        if (ret != 0) {
> +                cu_statusf(_BROKER, &s,
> +                           CMPI_RC_ERR_FAILED,
> +                           "Unable to shutdown guest");
> +                goto out;
> +        }
> +
> +        for (i = 0; i < MIGRATE_SHUTDOWN_TIMEOUT; i++) {
> +                if ((i % 30) == 0) {
> +                        CU_DEBUG("Polling for shutdown completion...");
> +                }
>   
Everything looks good to me, but whenever I see the modulo operator I 
wanna make sure I know what's going on. This is essentially "print a 
'polling' message every thirty seconds so the user can see we haven't 
died", right? And not to sign myself up for more work, but would this be 
the kind of place for an indication?


-- 

-Jay




More information about the Libvirt-cim mailing list