Re: [PATCH 05/16] Wire up SPICE client relocation with QEMU migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/11/2011 03:09 AM, Daniel P. Berrange wrote:
> Use the graphics information from the QEMU migration cookie to
> issue a 'client_migrate_info' monitor command to QEMU. This causes
> the SPICE client to automatically reconnect to the target host
> when migration completes
> 
> * src/qemu/qemu_migration.c: Set data for SPICE client relocation
>   before starting migration on src
> * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
>   src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
>   src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
>   new qemuMonitorGraphicsRelocate() command
> ---
>  
> +static int
> +qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
> +                                  virDomainObjPtr vm,
> +                                  qemuMigrationCookiePtr cookie)
> +{
> +    qemuDomainObjPrivatePtr priv = vm->privateData;
> +    int ret;
> +
> +    if (!cookie)
> +        return 0;
> +
> +    if (!cookie->graphics)
> +        return 0;
> +
> +    /* QEMU doesnt' support VNC relocation yet, so

s/doesnt'/doesn't/

> @@ -1129,6 +1162,9 @@ static int doNativeMigrate(struct qemud_driver *driver,
>                                         QEMU_MIGRATION_COOKIE_GRAPHICS)))
>          goto cleanup;
>  
> +    if (qemuDomainMigrateGraphicsRelocate(driver, vm, mig) < 0)
> +        VIR_WARN0("unable to provide data for graphics client relocation");

More rebasing fun.

> +{
> +    int ret;
> +    VIR_DEBUG("mon=%p type=%d hostname=%s port=%d tlsPort=%d tlsSubject=%s",
> +              mon, type, hostname, port, tlsPort, NULLSTR(tlsSubject));
> +
> +    if (mon->json)
> +        ret = qemuMonitorJSONGraphicsRelocate(mon,
> +                                              type,
> +                                              hostname,
> +                                              port,
> +                                              tlsPort,
> +                                             tlsSubject);

Indentation.

ACK with this squashed in:

diff --git i/src/qemu/qemu_migration.c w/src/qemu/qemu_migration.c
index 6fa21be..99b5116 100644
--- i/src/qemu/qemu_migration.c
+++ w/src/qemu/qemu_migration.c
@@ -754,7 +754,7 @@ qemuDomainMigrateGraphicsRelocate(struct
qemud_driver *driver,
     if (!cookie->graphics)
         return 0;

-    /* QEMU doesnt' support VNC relocation yet, so
+    /* QEMU doesn't support VNC relocation yet, so
      * skip it to avoid generating an error
      */
     if (cookie->graphics->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE)
@@ -1163,7 +1163,7 @@ static int doNativeMigrate(struct qemud_driver
*driver,
         goto cleanup;

     if (qemuDomainMigrateGraphicsRelocate(driver, vm, mig) < 0)
-        VIR_WARN0("unable to provide data for graphics client relocation");
+        VIR_WARN("unable to provide data for graphics client relocation");

     /* Issue the migrate command. */
     if (STRPREFIX(uri, "tcp:") && !STRPREFIX(uri, "tcp://")) {
diff --git i/src/qemu/qemu_monitor.c w/src/qemu/qemu_monitor.c
index 7e0e46e..15c6cab 100644
--- i/src/qemu/qemu_monitor.c
+++ w/src/qemu/qemu_monitor.c
@@ -1638,7 +1638,7 @@ int qemuMonitorGraphicsRelocate(qemuMonitorPtr mon,
                                               hostname,
                                               port,
                                               tlsPort,
-                                             tlsSubject);
+                                              tlsSubject);
     else
         ret = qemuMonitorTextGraphicsRelocate(mon,
                                               type,


-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]