From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwwED-0003Tb-2d for qemu-devel@nongnu.org; Fri, 26 Aug 2011 09:13:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwwEB-000495-O4 for qemu-devel@nongnu.org; Fri, 26 Aug 2011 09:13:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwwEB-00048f-GT for qemu-devel@nongnu.org; Fri, 26 Aug 2011 09:13:43 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7QDDgVu011613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Aug 2011 09:13:42 -0400 Date: Fri, 26 Aug 2011 14:13:38 +0100 From: "Daniel P. Berrange" Message-ID: <20110826131338.GB713@redhat.com> References: <1313773728-6104-1-git-send-email-alevy@redhat.com> <4E576D69.8020103@redhat.com> <20110826100338.GH3944@redhat.com> <4E5772D6.1090304@redhat.com> <20110826104342.GY6393@bow.redhat.com> <4E577CCD.2080001@redhat.com> <20110826110459.GK3944@redhat.com> <4E57941F.1060403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4E57941F.1060403@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/3] client_migrate_switch and auto_switch (RHBZ 725009) Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Alon Levy , qemu-devel@nongnu.org On Fri, Aug 26, 2011 at 02:39:59PM +0200, Gerd Hoffmann wrote: > >> (1) libvirt sets spice ticket at dst (stage 2) > >> (2) migration src->dst (stage 3) > >> (3) spice client switches connection to dst > > > >This is actually what we have already. The problem is that > >the 'migration src->dst' here can take an arbitrary amount > >of time. So by the time the spice client switchs to dst, > >the ticket will likely have already expired. > > Ah, *that* is the bug. > > >The only way to fix this AFAICT is to ensure the SPICE > >client connects to dst before migration starts, but delays > >display switch until the end. eg > > > > (1) libvirt sets spice ticket at dst (libvirt stage 2) > > (2) spice client connects to dst (start of libvirt stage 3) > > That must be in stage 2. Once the migration started qemu will not > accept new connections and thus the client would not be able to > connect. NB, I said "start of libvirt stage 3" which has multi-steps: 3. Perform(src) - Issue migrate_client_info - Issue migrate_set_speed - Issue migrate - Loop - Issue query-migrate - Break if finished/failed ie, before step 3.3 > Can qemu handle async monitor commands now? We would need to wait > until the client has actually connected, but without blocking the > iothread because it can take a while. Not sure about that Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|