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

Re: [Xen-devel] question about migration



On 04/01/16 17:46, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [Xen-devel] question about migration"):
>> On 04/01/16 15:31, Ian Jackson wrote:
>>> * It is not possible to resume the domain in the source after it has
>>>   suspended.
>> This functionality exists and is already used in several circumstances,
>> both by libxl, and other toolstacks.
> Oh!
>
>> xl has an added split-brain problem here that plain demonic toolstacks
>> don't have; specifically that there are two completely independent
>> processes playing with the domain state at the same time.
>>
>> The daemonic xl needs to ignore DOMAIN_SHUTDOWN and tidy up only after
>> DOMAIN_DEATH.  Under these circumstances, a failed migrate which resumes
>> the domain won't result in qemu being cleaned up.
> I think there is some kind of further underlying problem here.
>
> 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.

(Actually, there are 3 VIRQs on a standard shutdown path, but the final
two are very close together.  It is exceedingly likely that they are
amortised in the time it takes dom0 to respond to the evtchn for the
penultimate notification.)

>
> 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.

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.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.