From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs7cE-0000JH-5I for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:17:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs7c9-0002qE-1T for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:17:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs7c8-0002q9-OA for qemu-devel@nongnu.org; Thu, 06 Oct 2016 08:17:28 -0400 Date: Thu, 6 Oct 2016 13:17:24 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20161006121723.GC3087@work-vm> References: <1475147192-31228-1-git-send-email-lizhijian@cn.fujitsu.com> <1475147192-31228-2-git-send-email-lizhijian@cn.fujitsu.com> <20160930061516.GC1429@amit-lp.rh> <6327b0c2-6017-f80c-ed48-db7e9917ad25@cn.fujitsu.com> <20160930095833.GB2095@work-vm> <7591bf12-de63-c356-5e44-e20c3e59f26f@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7591bf12-de63-c356-5e44-e20c3e59f26f@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH 2/2] migration: send and check the devices between source and distination at the begining List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Zhijian Cc: Amit Shah , qemu-devel@nongnu.org, quintela@redhat.com * Li Zhijian (lizhijian@cn.fujitsu.com) wrote: > > > On 09/30/2016 05:58 PM, Dr. David Alan Gilbert wrote: > > * Li Zhijian (lizhijian@cn.fujitsu.com) wrote: > > > > > > > > > On 09/30/2016 02:15 PM, Amit Shah wrote: > > > > Hi, > > > > > > > > On (Thu) 29 Sep 2016 [19:06:32], Li Zhijian wrote: > > > > > Priviously, if the source and distination have different devices, source could goto > > > > > the status "paused (postmigrate)", and the distination will exit that means no qemu > > > > > is alive. > > > > > > > > > > After this patch, at above case, source can dectect the some error early from distination > > > > > and stop the migration, source keep in status "running". > > > > > > > > How would incoming migrations from previous versions work? > > > > > > You are right. we need to consider more. > > > > > > How about that: > > > we need to introduce a new section type(e.g: QEMU_VM_SECTION_DEVICE_LIST). > > > > > > source side: > > > - at the beginning of qemu_savevm_state_begin(), send QEMU_VM_SECTION_DEVICE_LIST first > > > - original path > > > > > > dst side: > > > - if we got the QEMU_VM_SECTION_DEVICE_LIST, have a check with the devices(name,version) > > > - otherwise original path > > > > Yes, and only send it on new machine types. > > I think a list could be a good idea; I don't worry too much about the 'paused (postmigrate)' > > case, because libvirt can spot that the destination failed and then restart the source, > Oh, that's what I didn't know before. Thank for your information. > > > > however a list would also fix the opposite case; where the destination has an extra device > > that the source does not have, in most cases I think that doesn't cause a failure at the moment > What's our expected behavior? I think in most cases(where the destination has an extra device > that the source does not have), destination seems fine after migration. > > If we expect migration failure, it needs more check. I think it's a check we could add that would detect more misconfigurations. (you'd have to be careful about devices that just didn't need to send any migration state; and make sure it didn't break existing migrations). > > but the device has an unusual state. > > > > A QEMU_VM_SECTION_DEVICE_LIST would work, but perhaps a subsection of vmstate_globalstate > > would work? > > Currently, the vmstate_globalstate was saved/restored at the migration completion stage while I expect > the beginning of migration. Ah sorry, I was confused; it's vmstate_configuration (see migration/savevm.c) that's saved at the beginning. Dave > And i cook the V2, with a new section type called SECTION_HEADER, any comment is welcomed. > > Thanks > > > > > Dave > > > > > > > > Please correct me. > > > > > > Thanks > > > Zhijian > > > > > > > > > > > > > > > Amit > > > > > > > > > > > > > > > > > > > > > > > -- > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > > > > > . > > > > -- > Best regards. > Li Zhijian (8555) > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK