From: Ian Jackson Subject: Re: question about migration Date: Tue, 5 Jan 2016 15:40:45 +0000 Message-ID: <22155.58365.880238.926906@mariner.uk.xensource.com> References: <567B58A0.7010201@cn.fujitsu.com> <567BE6B7.4030800@citrix.com> <567C9FBD.4000104@cn.fujitsu.com> <567CB2B7.9010808@cn.fujitsu.com> <568280A1.80703@citrix.com> <22154.36943.266930.151060@mariner.uk.xensource.com> <568AA001.2080904@citrix.com> <22154.45023.342526.976735@mariner.uk.xensource.com> <568AB45B.1080609@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <568AB45B.1080609@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , "Ian.Campbell@citrix.com" , Wen Congyang , xen devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [Xen-devel] question about migration"): > On 04/01/16 17:46, Ian Jackson wrote: > > Suppose a domain goes into SHUTDOWN with reason code SUSPEND. Then > > later it is resumed again (perhaps the migration failed). And later > > it shuts down cleanly. > > > > Will this generate a second @releaseDomain ? How is a toolstack > > supposed to discover this situation ? > > By the looks of it in Xen, domain_resume() sets d->is_shut_down = 0, > which means a subsequent domain_shutdown() will generate a new VIRQ. > > Therefore, a new @releaseDomain will arrive at a later point. Well, jolly good. > > Should libxl simply treat domains in state SHUTDOWN/SUSPEND as if they > > were running, and not issue a notification to anyone ? > > As far as libxl_evenable_domain_death() is concerned, yes. Would you like to prepare a patch ? > In general however, no. Consider a libxl user (such as a snapshotting > utility) which asks a domain to suspend to quiesce the disks and then > intends to resume the domain. Currently such a utility would have to use libxl_evenable_domain_death to discover when the domain suspends, but that would cause breakage as discussed in this thread. So I think such a utility would need a new libxl evenable interface. Do you agree ? Ian.