Re: [PATCH virt-viewer] virt-viewer: Ensure to not close during migration

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

 



On Thu, May 18, 2017 at 11:30:04AM +0200, Pavel Grunt wrote:
> Take a look at the shutdown event detail before killing
> the connection.
> 
> Regression since commit a62827d28c6b69e90102e4c1c8043cbddad8929a
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442929
> Signed-off-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
> ---
>  src/virt-viewer.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer.c b/src/virt-viewer.c
> index 3b96534..4a4570f 100644
> --- a/src/virt-viewer.c
> +++ b/src/virt-viewer.c
> @@ -721,7 +721,7 @@ static int
>  virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED,
>                           virDomainPtr dom,
>                           int event,
> -                         int detail G_GNUC_UNUSED,
> +                         int detail,
>                           void *opaque)
>  {
>      VirtViewer *self = opaque;
> @@ -736,6 +736,10 @@ virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED,
>  
>      switch (event) {
>      case VIR_DOMAIN_EVENT_STOPPED:
> +        /* do not disconnect due to migration */
> +        if (detail == VIR_DOMAIN_EVENT_STOPPED_MIGRATED) {
> +            break;
> +        }

Only SPICE does seemless migration, so this surely needs to be conditional,

NB, we rely on the domain events to exit promptly when using SSH tunnelling,
because the SSH tunnel does not go away when the remote VNC/SPICE closes
the connection. So we can't just rely on VNC conenction terminating to make
us exit.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux